Hello I'm trying do something in JS after form has been submitted but following the documentation isn't working for me. I've created a from and set it to be submitted using AJAX. I've added it to a page using the shortcode and using the custom html block I've added this code:
(() => {
document.addEventListener('frmFormComplete', (event, form, response) => {
console.log('test');
});
})();
After the form is submitted I don't see anything in the console. Am I doing something wrong or this is a bug? The doc page I'm following: https://formidableforms.com/knowledgebase/javascript-examples/javascript-after-form-submit/#kb-perform-action-after-form-submit
It seems vanilla JS can't catch events triggered by Jquery. Thank you for your help guys.
I set up a quick test, first using the format in the example on the FF documentation page and it worked. I then substituted your code and it did not.
Please login or Register to submit your answer