How to Disable a PDF Form Option When Another Is Selected
Question details
The user wants to create mutually exclusive options (e.g., A4 and A5) in a fillable PDF form, where selecting one option automatically disables or grays out the alternative.

- Product
- Device & OS
- not provided
- Scenario
- Designing a fillable PDF form with choices that are strictly mutually exclusive.
- Observed behavior
- Currently, multiple options can be selected simultaneously. The goal is to enforce a single selection by linking the options so that selecting one affects the state of the other.
Ensure you are using a PDF editor that supports advanced form field properties, as basic PDF readers cannot modify form behaviors or execute scripts.
Use a Radio Button Group
The standard and most reliable method to create mutually exclusive options in a PDF is to use a radio button group instead of separate checkboxes.
Radio buttons are specifically designed for mutually exclusive choices. By assigning the exact same field name to multiple radio buttons, the PDF reader will automatically deselect all other buttons in that group when a user clicks one of them.
Open your PDF editor, navigate to the Form or Prepare Form tab, and select the 'Radio Button' tool. Click on your document to place the first button (e.g., for A4) and repeat to place the second button (e.g., for A5).
Right-click the first radio button and select 'Properties'. Under the General tab, enter a shared group name in the 'Name' field (for example, 'PaperSize'). Do the exact same for the second radio button.
In the Properties menu for each button, navigate to the Options tab. Under 'Radio Button Choice' or 'Export Value', assign a unique value for each (e.g., 'A4' for the first button and 'A5' for the second). Close the properties panel.
Exit form editing mode and click the radio buttons. Selecting one will now automatically deselect the other.

Use Checkboxes with a Custom JavaScript Action
If your form design strictly requires the visual appearance of checkboxes, you can use a JavaScript action to dynamically disable the opposing checkbox when one is clicked.
Easily Create Interactive PDF Forms with WPS Office
WPS Office offers a comprehensive suite of PDF editing tools, allowing you to quickly insert radio buttons, text fields, and interactive checkboxes to build professional, mutually exclusive form choices in minutes.
- 1. Open Your PDF: Launch WPS Office and open your PDF document. Switch to the 'Form' tab in the top navigation ribbon.
- 2. Add Form Fields: Click the 'Radio Button' icon to add your mutually exclusive options to the document canvas.
- 3. Configure Properties: Double-click the inserted radio buttons to open their properties. Give them the identical Field Name to group them together.
- 4. Save and Share: Once configured, save your PDF. The form fields will work seamlessly when opened by users on various devices.

Frequently Asked Questions
Why do both of my radio buttons get selected at the same time?
This happens when the radio buttons have different Field Names. To make them mutually exclusive, they must share the exact same Field Name but have distinct export values in their properties.
Can I make checkboxes mutually exclusive without writing JavaScript?
Yes, by giving multiple checkboxes the exact same Field Name but different export values, they will act similarly to radio buttons. However, using actual radio buttons is the recommended standard for mutually exclusive options.
How do I make a form field read-only to prevent user edits?
Right-click the form field, open its Properties, go to the General tab, and check the 'Read-Only' box. This locks the field so users cannot alter its value manually.
Will JavaScript form scripts work on all PDF viewers?
No. While JavaScript works perfectly in full-featured desktop PDF editors like WPS Office or Adobe Acrobat, many mobile PDF viewers and built-in browser PDF readers do not fully support executing JavaScript.




