Create event on form submission

By: Tom Boltwood | Asked: 02/20/2023
ForumsCategory: General questionsCreate event on form submission
Tom BoltwoodTom Boltwood asked 2 years ago
I'm trying to configure an event for GTM on form submission. I am trying to follow this guide: https://formidableforms.com/knowledgebase/javascript-examples/javascript-after-form-submit/ I want to use the following code: <script>
    dataLayer.push({'event': 'enquiry'});
</script> However, the notification message box seems to be a classic editor and is wrapping my <script> tags in <p> tags.  I guess it's valid code, but I'd rather not do it. Is there a better way to be tracking a form submission event? I'm using Contact Forms on another site and that appears to automatically fire an event on submission by default.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right