Prevent New Form Fields from Being Included in PDF Reset Actions
Question details
The user wants to prevent newly created PDF form fields from automatically being added to the clear actions of existing reset buttons.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Creating or modifying interactive PDF forms with multiple fields and specific reset buttons.
- Observed behavior
- Newly added form fields are automatically selected in existing 'Reset a Form' button actions, causing unintended data clearing when the button is clicked.
Before modifying form actions or adding scripts, save a backup copy of your PDF to ensure you do not lose your current field configurations.
Use a JavaScript Action to Reset Specific Fields
Replacing the default 'Reset a Form' action with a custom JavaScript command ensures that only designated fields are cleared, preventing new fields from being affected automatically.
By default, standard reset actions will automatically encompass new fields added to the document. Using a targeted JavaScript array explicitly defines the scope of the reset button, keeping it completely static.
Right-click your existing Reset button in form editing mode and select 'Properties'.
Navigate to the 'Actions' tab, select the existing 'Reset a Form' action, and click 'Delete'.
Choose 'Run a JavaScript' from the 'Select Action' dropdown menu, then click 'Add'.
In the JavaScript editor, enter the command: this.resetForm(["Field1", "Field2"]); replacing 'Field1' and 'Field2' with the exact names of the fields you want to clear. Click OK to save.

Manually Deselect New Fields in Button Properties
If you prefer not to use JavaScript, you can manually update the standard reset action to exclude new fields.
Edit and Manage PDF Forms with WPS Office
WPS PDF provides an intuitive interface for editing interactive PDF forms, modifying text, and managing document properties quickly and easily.
- 1. Open WPS Office: Download and launch WPS Office, then select the PDF module from the home screen.
- 2. Load Your Form: Open your interactive PDF form document directly within the application.
- 3. Edit Form Elements: Switch to the 'Form' or 'Edit' tab on the ribbon to manage fields, text, and other interactive elements.
- 4. Save Your PDF: Save your updated PDF form securely without losing format compatibility.

Frequently Asked Questions
Why does the default Reset button clear every field in my PDF?
By default, the 'Reset a Form' action in standard PDF editors selects all fields present in the document. When a new field is added, the software assumes it belongs to the global form and automatically includes it in this default action.
Do I need to know advanced programming to use the JavaScript reset method?
No, you only need to copy a single line of code: this.resetForm(["FieldName"]);. You simply replace 'FieldName' with the exact name of the text box or dropdown field you want to clear.
Can I reset different sections of a PDF form using multiple buttons?
Yes. By using the JavaScript resetForm() command on different buttons and specifying different field names for each, you can create customized 'Clear Section' buttons throughout your document without them interfering with one another.




