PDF Editing Issues

How to Hide Acrobat Form Fields After Resetting a PDF

Natalie TaylorNatalie Taylor Nov 10, 2026 868 views

Question details

The user needs to ensure that conditionally hidden PDF form fields return to their hidden state after the form is cleared or reset.

How to Hide Acrobat Form Fields After Resetting a PDF
Product
Adobe Acrobat / PDF
Device & OS
not provided
Scenario
Creating or filling an interactive PDF form with conditional fields tied to checkboxes.
Observed behavior
Resetting the form clears the field values but fails to reset the display properties, leaving hidden fields visible.
Before you start

Ensure you have access to the PDF form editing tools and basic knowledge of adding JavaScript actions to buttons within your PDF editor.

Solution 1Recommended

Create a Custom Reset Button Using JavaScript

Replace the default reset action with a custom script that clears data and resets field visibility simultaneously.

The standard form reset functionality in PDF editors only clears the input values of the fields. It does not revert any display properties (like visibility) that were triggered by user actions during the session. To resolve this, you must override the default reset button with a custom JavaScript action.

1
Add a new button

Open your PDF form in edit mode and insert a new Button field where you want the Reset function to be.

2
Access button properties

Right-click the button, select 'Properties', and navigate to the 'Actions' tab.

3
Set the action type

Choose 'Mouse Up' as the trigger, set the 'Select Action' dropdown to 'Run a JavaScript', and click 'Add'.

4
Add the reset script

In the JavaScript editor, enter the code to reset the form data: this.resetForm();

5
Add the visibility script

On the next line, add the code to hide the specific conditional fields. For example: this.getField("FieldName").display = display.hidden;

Create a Custom Reset Button Using JavaScript
Tip on Hierarchical Field Naming: If you have multiple fields to hide, use a hierarchical naming convention with a dot suffix like 'Field.1', 'Field.2', and 'Field.3'. This allows you to hide all of them at once using a single line: this.getField("Field").display = display.hidden;
Efficient PDF Form Management

Manage and Edit PDF Forms Seamlessly with WPS Office

WPS Office provides robust PDF editing capabilities, allowing you to fill, create, and manage interactive PDF forms effortlessly. Whether you need to process conditional form fields or convert documents, WPS Office has you covered.

  1. 1. Open PDF: Launch WPS Office and open your interactive PDF document.
  2. 2. Access Form Tools: Navigate to the 'Form' tab to interact with, fill, or modify form fields easily.
  3. 3. Save and Export: Save your filled or modified PDF directly, ensuring strict compatibility across all standard PDF viewers.
Easily fill out and interact with complex PDF forms and checkboxes.Fully compatible with Microsoft Word, Excel, PowerPoint, and standard PDF formats.Lightweight, fast, and user-friendly interface for everyday document tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the default Reset Form button hide my fields?

The standard reset action is only designed to clear the values (data) entered into the fields. It does not revert visual or display properties (such as visibility) that were modified by custom JavaScript interactions during the session.

How does hierarchical field naming work in PDFs?

By naming fields with a shared prefix and a dot (e.g., 'Group.1', 'Group.2', 'Group.3'), you create a hierarchy. A single JavaScript command targeting the parent 'Group' will automatically apply the changes to all child fields, making it highly efficient to show or hide multiple fields at once.

Can I reset specific fields instead of clearing the whole form?

Yes. When writing custom JavaScript for your reset button, you can pass an array of specific field names to the reset function (for example: this.resetForm(["Field1", "Field2"]);). This will clear only the specified fields while leaving the rest of the form intact.