The after-form-submit event is fired after the submission of a sign-up block form. This is one of the various events WisePops can trigger as part of our JS Callbacks feature.
 

Prevent action after submission

The action after the form submission can be prevented, by calling preventDefault() on the event:

wisepops('listen', 'after-form-submit', function(event) {
  event.preventDefault();
});

Preventing this event will only cancel the final action (load new page, scroll to anchor, close popup). The filled data will still be collected. 

Please refer to the before-form-submit event to prevent the whole form submission.

Event target

The targeted element (event.target) is the same element as the native submit event target.

This means that you can easily retrieve the fields of your form (and their values) by using event.target.elements['Field ID'] . To retrieve the email value, you will write:

var emailValue = event.target.elements['email'].value;

Use cases

Did this answer your question?