PDF Editing Issues

Show and Hide PDF Form Fields in Adobe Acrobat

Phi Hung VoPhi Hung Vo Nov 19, 2026 868 views

Question details

The user wants to reveal or hide descriptions and checkboxes by clicking a category header in a PDF form.

Show and Hide PDF Form Fields in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating a PDF form with category headers that control the visibility of related content.
Observed behavior
The desired form would show or hide a category's descriptions and checkboxes when its header is clicked.
Before you start

Open the PDF in Acrobat and check that you can access Prepare a form. Identify the descriptions and checkboxes that should appear together; descriptions must be form fields if you want to control their visibility with a button.

Solution 1Recommended

Toggle Form Fields with an Acrobat Button

Use a button and JavaScript to show or hide a description field and checkbox within a fixed PDF layout.

Acrobat can change form-field visibility, but this does not create a dynamically expanding section: the surrounding page content will not automatically move to fill or create space.

The toggle depends on JavaScript support in the PDF viewer. Test the form in the Acrobat or Reader versions your recipients will use.

1
Create the fields

Open All tools > Prepare a form. Add a text field for the description and a checkbox, and name them Description and CategoryCheck in their field properties. Make the description field read-only if users should not edit it.

2
Set the initial visibility

Open Properties for each field and use the General tab's Form Field setting to make both fields hidden initially. Reserve space for them in the page layout.

3
Add a header button

In Prepare a form, add a button over or beside the category header. Open its Properties and use the Options tab to give it a recognizable label.

4
Add the toggle action

In the button's Properties, open Actions. Select Mouse Up as the trigger and Run a JavaScript as the action, then click Add. Enter: var desc = this.getField('Description'); var check = this.getField('CategoryCheck'); var state = desc.display === display.hidden ? display.visible : display.hidden; desc.display = state; check.display = state;

5
Test the form

Close the properties, preview the form, and click the category button twice to check that both fields appear and disappear. Save the PDF and test it in the intended viewer.

Toggle Form Fields with an Acrobat Button
Field names and layout: The script's field names must match the names in your form. Hidden fields leave their reserved page space in place, and ordinary static PDF text will not be hidden by this script.
Free Microsoft Office alternative

Work with PDF and Office Files in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for working with documents, spreadsheets, presentations, and PDFs. Its format support can make switching from Microsoft Office easier; it does not turn a fixed PDF layout into a dynamically reflowing form.

Open and review PDF forms alongside your other documentsCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXUse a familiar interface for everyday Office tasksWork with a lightweight suite with free tools
microsoft office alternative - wps office

Frequently Asked Questions

Can an Acrobat PDF form expand and move the fields below it?

A standard Acrobat PDF form has a fixed page layout. You can show or hide form fields, but the surrounding content does not automatically reflow. Use a web form if the page must expand and collapse dynamically.

Can I show or hide fields without JavaScript?

Yes. In a button's Properties > Actions, Acrobat offers a Show/Hide a field action. Configure the action for the fields you want to show or hide; a single-click toggle between both states can be implemented with JavaScript.

Why does my PDF toggle not work in a browser?

Some browser PDF viewers do not fully support Acrobat form JavaScript. Open the saved file in Acrobat or Acrobat Reader and test the button there, then verify compatibility with the viewers your recipients use.

Can a button's rollover or down state expand the form?

No. In button Properties > Options, the Up, Rollover, and Down states change the button's appearance. They do not show other fields or reflow the page by themselves.