javascriptjquerywordpressgravity-forms-plugin

Prevent page reload after submission


I'm working with WordPress Gravity Forms plugin. I loaded a form into a jquery dialog and I want to have the dialog to close after form submission instead of reloading the page.

However, I don't know, if it is possible to add preventDefault() into submit() event. Or if there is an option not to reload the page in the Gravity Forms.

Please, advise me a possible way to achieve it.


Solution

  • Do you have the Enable AJAX options checked?

    Look at https://web.archive.org/web/20150415003507/http://www.gravityhelp.com:80/documentation/gravity-forms/user-guides/getting-started/embedding-a-form/: this will submit your form without a page refresh.

    Then just call the dialog close in the submit event and you are done!