Gravity Forms does not have a built-in method for enabling any type of form reset button. This doc will show you how to add a Reset Form button or Clear Form button to any form built with Gravity Forms.
How To Fix It
There are two different approaches, use whichever one best fits your needs.
- Using the gform_submit_button filter
- Using one line of HTML in an HTML field
1. The gform_submit_button filter does not work on all pages in a multi-page forms (workaround here)
2. Neither solution will clear fields populated dynamically
3. Neither solution will clear a Product field that uses the Calculation field type
Using the Filter
With this option, you can target a specific form, or apply the Reset Button to all forms on your website.
The Reset button will be placed next to the submit button.
- Copy the code snippet below
- Paste the snippet into your themes functions.php file or a functionality plugin like WPCodeBox (recommended).
- Modify the code as needed
- Add your form ID to the filter if you want to only add the reset button to one form (i.e gform_submit_button_11)
- Change the button text by modifying the value on line 31 (i.e value=”Button Text”)
Using an HTML Field
This solution isn’t ideal if you want to apply the reset button to all forms (use the filter for that), but this is a simple solution that can be implemented quickly if you just need to add it to one form.
The button is also placed within the form (wherever you put the HTML field) as opposed to next to the Submit Button.
- Add an HTML field to your form
- Copy the line of code below
- Paste it into the HTML field Content box
- Modify the value (button text) if desired
- Click Save Form
<input type="reset" value="Clear Form" />
Have a Multi-Page Form?
You can use the HTML method on a multi-page form, you would just need to add an HTML field to each page with the code above. You can change the button text to “Clear Page”, so that the user knows it will not reset the whole form.
Need More Help?
If you still need help, feel free to use the comments or chat options below.