Skip to content

Commit

Permalink
Merge pull request #23735 from colemanw/afformTriggerSuccess
Browse files Browse the repository at this point in the history
Afform - Trigger 'crmFormSuccess' event after submission
  • Loading branch information
eileenmcnaughton authored Jun 9, 2022
2 parents ce2ccec + 30f3454 commit 4332d7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/afform/core/ang/af/afForm.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
function postProcess() {
var metaData = ctrl.getFormMeta();

$element.trigger('crmFormSuccess', {
afform: metaData,
data: data
});

if (metaData.redirect) {
var url = metaData.redirect;
if (url.indexOf('civicrm/') === 0) {
Expand Down

0 comments on commit 4332d7b

Please sign in to comment.