Mautic Community Forums

Embedded form validation

Is there a way to get the validation output of the Mautic form that is embedded on our website?



We are using the JS way (i.e. including the one-liner which uses an intermediate iframe to send data to Mautic). We need to close the modal popup that contains the form and show a thank you once the form has been properly submitted. Any ideas on how to do that would be greatly appreciated.



It would also allow for proper third-party integration

Is there a way to get the validation output of the Mautic form that is embedded on our website?

We are using the JS way (i.e. including the one-liner which uses an intermediate iframe to send data to Mautic). We need to close the modal popup that contains the form and show a thank you once the form has been properly submitted. Any ideas on how to do that would be greatly appreciated.

It would also allow for proper third-party integration

For those looking for the answer, Mautic has a very nice set of JS that takes care of validation and pushes onto the Mautic installation. If you want to run the validation yourself, you can temporarily disable it, run your validation and then call the submit scripts knowing they have a high chance of success.

If someone is interested, post here and we’ll share the code – some cleanup required, don’t want to do it for nothing :slight_smile:

If @escopecz or @alanhartless have better ideas, I am listening :slight_smile:

Can you please share the code?
thanks :slight_smile: