How to Control Which PDF Form Fields Are Reset in Acrobat
Question details
The user wants to reset specific fields in a large PDF form without clearing the entire document.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Designing or editing an interactive PDF form that requires a reset button.
- Observed behavior
- The default reset-form actions clear all fields in the document, including the ones the user wishes to preserve.
Ensure you know the exact names of the form fields you want to reset, as they are case-sensitive and must match the script perfectly.
Use the resetForm JavaScript Method
Apply a custom JavaScript action to your reset button to target specific field names.
Instead of using the default 'Reset a form' action which clears everything, you can attach a simple JavaScript command to your button. This script allows you to specify an exact list of fields to clear.
Open your PDF in form editing mode, right-click the Reset button, and select Properties.
Go to the Actions tab, choose 'Run a JavaScript' from the Select Action dropdown, and click Add.
In the JavaScript Editor, type: this.resetForm(["Field 1", "Field 2", "Field 3"]); replacing the field names with your actual targets.
Click OK to save the script, close the properties window, and click your button in preview mode to verify only the specified fields are reset.

Create and Edit Interactive PDF Forms with WPS Office
WPS Office provides a robust built-in PDF editor that allows you to manage PDF form fields, edit text, and organize documents efficiently without needing expensive software.
- 1. Open your PDF: Launch WPS Office and open your PDF document.
- 2. Access the Form tab: Navigate to the Form tab on the top ribbon to insert or edit interactive fields.
- 3. Customize field properties: Double-click any form field to adjust its behavior, appearance, and specific actions.

Frequently Asked Questions
Why does my PDF reset button clear everything instead of specific fields?
By default, a standard 'Reset a form' action in PDF editors will clear all input fields in the document. To prevent this, you must explicitly define which fields to reset using a custom JavaScript array.
Can I exclude just one field from being reset?
Yes, but the standard resetForm script requires you to list the fields you do want to reset. If you have many fields, you must list all of them except the one you want to exclude, or use a more complex script to loop through the document fields and skip the specific name.
Does this JavaScript work on all PDF viewers?
Custom JavaScript actions are supported by standard desktop PDF readers like Adobe Acrobat, WPS PDF, and Foxit. However, some basic mobile PDF viewers or web browser extensions may not support JavaScript execution.




