Keep Form Fields from Resetting
This script prevents fields marked with the CSS class no-reset-field from being cleared or reset after form submission, ensuring their values are preserved.
Specifications
Keep Form Fields from Resetting
6 January, 2026
-
Plugin
-
Category
-
Programming languages
Installing Instruction
- Copy the provided JavaScript code snippet to your clipboard.
- Add the code using one of the following methods:
-
Option A: Using a Custom Code Plugin (Recommended)
- Install and activate a plugin such as WPCode Lite, Code Snippets, or Simple Custom CSS and JS.
- Create a new JavaScript snippet.
- Paste only the JavaScript code, without <script> tags.
- Save and activate the snippet.
-
Option B: Using a Custom Code / HTML Area
- Add the code in a Custom HTML widget or directly into a theme file (for example, header.php or footer.php).
- Keep the <script> tags when using this method.
- Save your changes.
-
Option A: Using a Custom Code Plugin (Recommended)
Example Use Case
Use this snippet to prevent JetFormBuilder form fields marked with ‘no-reset-field’ from clearing after form submission, improving user experience by preserving field values.
Applicable scenarios:
- Long multi-step forms or surveys where users need to revisit previous answers.
- Ecommerce and booking forms preserving complex selections.
- Membership or application forms requiring persistent inputs during process.
Specifications
Keep Form Fields from Resetting
6 January, 2026
-
Plugin
-
Category
-
Programming languages