Would you like to prevent the page from refreshing when you submit a form? By default, the whole page needs to refresh after the user clicks the Submit button. This is typically what allows the entry data to be stored, notification emails to be sent out, and more. However, with AJAX form submissions, the form can submit and run all of these processes without any need for refreshing the entire page.
This tutorial will show you how to enable AJAX submissions for your forms.
Enabling AJAX Form Submissions
Before getting started, you’ll first need to make sure WPForms is installed and activated on your WordPress site and that you’ve verified your license. Then you can create a new form or edit an existing one to access the form builder.
Once the form builder is open, go to Settings » General. Then, scroll to the Advanced section and you’ll see a list of options. Go ahead and select the Enable AJAX form submission option.
When you’re ready, click the Save button to save the changes.
Note: Enabling AJAX form submissions is a useful option when embedding your form in a modal or popup.
Testing Your Form
Note: If you don’t want the field of view to move at all when the form submits, try turning off confirmation scrolling. You can do this in the form builder by going to Settings » Confirmation, then disabling the Automatically scroll to the confirmation message option.
That’s it! You can now allow users to seamlessly submit forms with AJAX form submissions.
Next, would you like to learn how to create smart forms? Be sure to check out our tutorial on conditional logic for all the details on how your forms can respond in customized ways based on user selections.