Fix PDF Form Reset Button Changing Read-Only Field Settings
Question details
Users need to prevent the Acrobat Reset Form button from overriding the read-only status of JavaScript-controlled PDF form fields.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Clearing an interactive PDF form that contains dynamically locked or read-only fields.
- Observed behavior
- The standard Reset Form action clears the field values but fails to restore JavaScript-controlled properties, resulting in read-only fields incorrectly becoming editable.
Ensure you have full editing permissions for the interactive PDF document and that your PDF viewer or editor supports executing JavaScript actions.
Add a JavaScript Action to Restore Read-Only Properties
Use this solution to explicitly re-apply the read-only status to your form fields at the same time the form values are cleared.
The default Reset Form action only restores the initial values of the fields, bypassing any dynamically applied JavaScript properties. By pairing the reset action with a custom script, you can ensure your fields remain locked.
Using hierarchical field names (like 'Section1.Field1') can make writing this script much easier, as you can target entire groups of fields at once.
Enter form editing mode in your PDF editor, right-click the Reset or Clear button, and select Properties.
Click on the Actions tab where you currently have the 'Reset a form' action configured.
Select 'Run a JavaScript' from the Select Action drop-down menu and click Add.
Enter the script to explicitly set the read-only property for your fields (e.g., this.getField('FieldName').readonly = true;) and click OK to save.

Manage and Fill Interactive PDF Forms with WPS PDF
WPS Office includes a robust PDF editor that easily handles viewing, filling, and managing interactive form fields with high compatibility.
- 1. Open the PDF Form: Launch WPS Office and open your interactive PDF document containing the form fields.
- 2. Access the Form Tab: Navigate to the Form tab on the top ribbon to view all interactive elements.
- 3. Edit Form Settings: Right-click on any button or text field to adjust properties and ensure your form behaves as expected.
- 4. Save the Document: Click the Save icon to apply all field adjustments and distribute your fully functioning form.

Frequently Asked Questions
Why do read-only fields become editable after resetting a PDF form?
The standard 'Reset a form' action is designed exclusively to revert fields to their default text or numerical values. It does not re-evaluate or restore dynamic states applied via JavaScript, such as the read-only property.
Can one button execute multiple actions in a PDF form?
Yes, PDF form buttons can be configured to run multiple actions sequentially. You can have a single button execute the default Reset Form action followed immediately by a custom JavaScript action.
How do hierarchical field names simplify PDF JavaScript?
By using a naming convention with dots (e.g., 'Employee.Name', 'Employee.ID'), you can apply a single JavaScript command to the parent 'Employee' field, which automatically updates the read-only status of all child fields.




