Hello @noxerr !
I hope you’re doing well!
Our developers have replied that it won’t be easy to do with pure JavaScript and it’s actually much easier to achieve using jQuery, especially that Forminator already enqueues it to handle its own actions.
You can differentiate between the forms by attaching the event listener to the form’s container instead of the entire document, so for example instead of:
jQuery(document).on('forminator:form:submit:success', function (e, formData) {
// do something for any form
});
You can do:
jQuery('#forminator-module-72').on('forminator:form:submit:success', function (e, formData) {
// do something only for the form with ID 72
});
Warm regards,
Pawel