Modal popup on click of submit button.

By: Robert Taylor | Asked: 07/07/2024
ForumsCategory: General questionsModal popup on click of submit button.
Robert Taylor asked 2 weeks ago
I disabled formidable themes and used a lot of custom css on my forms and now the "form animation providing feedback to the use that the form submit is in progress" no longer works.  In addition, the forms are on the large side and submit data to Google sheets which means that sometimes the submit process can be uncomfortably long without providing the user some visual indicator that the submit process has been started.

In response,  think I would like to either:

1) Provide a modal popup when I click of the submit button and just have the page reload take care of the popup notification modal closing through the form redirect on submit.  I would be happy to forego the ajax submit notification option if I could get this to work.

.. or

2)  Trigger a css animation that replicates the fade in and out of the form it self on submit which should be fairly straight forward.

Would this page be the correct code snippet that I should be looking at to create either of the above integrations:

Anyone ever build something like this and have suggestions if the above link is not correct? 

Thank you kindly.
1 Answers
Bobby Clapp answered 6 days ago

I usually add this to the confirmation cation of my forms to have a visual representation of a form submit.

jQuery('.some-class').html('Your subject was successfully submitted. Thank you! Please wait as you are redirected..');
setTimeout(function () {
window.location.href = ' ';
}, 1000);

This would hide the content of the form and display whatever you chose.

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