Prevent modal closing on contact form submission

Hi, I have a form embedded in a content modal, but when the form is submitted the modal closes so the user can’t see their confirmation message. Is there a way to prevent the form closing once the user clicks submit?

You can try it out here by clicking the request an appointment button: https://scanlancarroll.spiralorbdesigns.com/contact-us/

Thanks,
David

Hi David,

Thanks for reaching out.
That is only possible if that the form submitted using the AJAX request, so the page will not be refreshed. I would suggest you use the Contact Form 7 which submitted through the AJAX request by default.

Hope it helps.
Thanks

Thanks for clarifying.

I just found a workaround by redirecting to a new page upon submit and redirected to the same page with /?submit=submitted at the end of the url.
Then used a conditional field to display some confirmation text in the page using the url param key=submit IS submitted.

Such a cool feature :slight_smile:

Cheers,
David

Hello David,

It’s good to know that you have resolved your issue. If there is anything else we can help you with, please do not hesitate to open another thread.

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.