Embed form, trigger for invalid submission?

Hey,

I am currently using a embedded Hubspot form, but I want to trigger a GTM tracking event whenever a user tries to submit the form but isn’t validated correctly. I tried looking through the docs here:

https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options

But could only find events for AFTER when the form is already done being validated. I tried to intitate some functions to run when the form is ready as well but that didn’t not seem to work either. Is there anyone who can help me out? I just want something simple like running a alert(‘validation fails’) when the form is being submitted but not validated.

Hey, @SBandusomen :waving_hand: I don’t have a solution for you. Do you have any examples of how you tried to listen for the submit event and failed validation? Seeing code examples is the best way for the community to provide suggestions or assist you.

Thanks! — Jaycee