How to Hide Form Headings with Radio Buttons in Adobe Acrobat
Question details
The user needs to dynamically show or hide form headings (e.g., Credit Card, ACH, Check) when specific radio buttons are selected.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating an interactive payment form where section headings dynamically appear or disappear based on the user's chosen payment method.
- Observed behavior
- Static PDF text cannot be hidden directly with radio-button actions, requiring a workaround to convert the text into interactive form elements.
Ensure you have access to the 'Prepare Form' tool in your PDF editor and that your document is unlocked for form editing.
Convert Headings to Read-Only Text Fields and Use JavaScript
Transform your static text headings into read-only text fields, allowing you to use custom JavaScript attached to radio buttons to control their visibility.
Because static text cannot be dynamically hidden in PDF forms, you must replace the existing heading with an interactive element. A read-only text field perfectly mimics static text while granting you visibility control.
Open your document in Adobe Acrobat and select the 'Prepare Form' tool from the right-hand pane.
Delete the static text heading. Add a new Text Field in its place, name it appropriately (e.g., 'CreditCardHeading'), and enter the heading text as the 'Default Value' in the Options tab.
In the Text Field properties, go to the 'General' tab and check the 'Read-Only' box so users cannot edit the heading text.
Right-click the trigger Radio Button, select 'Properties', and go to the 'Actions' tab. Choose 'Mouse Up' as the trigger, select 'Run a JavaScript', and click 'Add'.
Input a script to toggle visibility, such as: getField('CreditCardHeading').display = display.visible; (Use display.hidden for the other radio buttons to hide it).

Use a Button Field with Built-in Show/Hide Actions
Use a button field customized to look like text to utilize Adobe Acrobat's built-in 'Show/hide a field' action without writing any code.
Design and Manage Interactive PDF Forms with WPS Office
WPS Office provides an intuitive and powerful PDF editor that allows you to effortlessly create interactive forms, add text fields, insert radio buttons, and customize form properties without needing complex software.
- 1. Open Your PDF: Launch WPS Office and open your PDF document using the built-in PDF editor.
- 2. Navigate to Form Tools: Click on the 'Form' tab in the top ribbon to access a full suite of interactive form controls.
- 3. Insert Form Elements: Select the required fields such as 'Text Field' or 'Radio Button', and place them on your document layout.
- 4. Customize Properties: Double-click the inserted fields to modify their names, appearance, and default values to suit your document.

Frequently Asked Questions
Can I hide regular static text in a PDF based on form selections?
No, standard static text in a PDF cannot be dynamically shown or hidden via form actions. You must replace the static text with an interactive form field, like a read-only text box or button, to control its visibility.
Do I have to use JavaScript to hide form fields in Acrobat?
Not necessarily. You can use the built-in 'Show/hide a field' action available in the radio button's properties. JavaScript is only required if you have complex conditional logic or multiple overlapping fields.
Why is my hidden field still appearing when I print the document?
To prevent hidden fields from printing, open the field properties, go to the 'General' tab, and ensure the 'Form Field' property is set to 'Hidden' or 'Visible but doesn't print'.




