PDF Editing Issues

How to Disable Other PDF Checkboxes When One is Selected

Adam DavisAdam Davis Nov 3, 2026 869 views

Question details

The user needs to make multiple checkboxes in a PDF form mutually exclusive, so that selecting one automatically disables or alters the state of the others.

How to Disable Other PDF Checkboxes When One is Selected
Product
PDF Editors
Device & OS
not provided
Scenario
Creating or modifying interactive PDF forms where certain checkbox selections should restrict users from choosing other specific options.
Observed behavior
By default, multiple checkboxes can be selected independently; the goal is to implement a script or property that forces dependent checkboxes to become read-only or deselected when a primary checkbox is checked.
Before you start

Ensure you have access to a professional PDF editor with form creation and JavaScript support, as basic PDF readers cannot edit form field properties or execute custom validation scripts.

Solution 1Recommended

Use JavaScript to Control Checkbox Read-Only States

Apply a custom JavaScript action to the checkbox properties so that checking it dynamically alters the read-only state of related fields.

This method uses the 'Mouse Up' trigger in your PDF form editor. By writing a short conditional script, you can instruct the document to lock (make read-only) or unlock other specific checkboxes whenever a user interacts with the current one.

1
Enter Form Editing Mode

Open your document in a PDF editor that supports form field manipulation. Navigate to the 'Form' or 'Prepare Form' tool to view all interactive fields.

2
Open Checkbox Properties

Right-click the primary checkbox that will control the others, and select 'Properties' from the context menu.

3
Add a JavaScript Action

Go to the 'Actions' tab. Choose 'Mouse Up' from the Select Trigger dropdown, and 'Run a JavaScript' from the Select Action dropdown. Click 'Add'.

4
Input the Control Script

In the JavaScript editor, type a script to check the value. For example: `if(event.target.value !== 'Off') { this.getField('Checkbox2').readonly = true; } else { this.getField('Checkbox2').readonly = false; }`. Replace 'Checkbox2' with the actual name of your target field.

5
Apply to Remaining Fields

Click 'OK' to save the script. Repeat this process for any other checkboxes in the group, adjusting the target field names in the script so they all update dynamically based on the user's selection.

Use JavaScript to Control Checkbox Read-Only States
Alternative: Use Radio Buttons: If you simply want users to select only one option from a list (mutually exclusive choices), it is easier to use Radio Buttons. By assigning the exact same 'Group Name' to multiple radio buttons, the PDF will automatically allow only one to be selected without requiring any JavaScript.
Advanced PDF Form Editor

Create and Manage Interactive PDF Forms with WPS Office

WPS Office features a robust PDF editing suite that allows you to easily insert checkboxes, radio buttons, and text fields into your documents. Create professional, fillable forms without the need for complex formatting.

  1. 1. Open Your PDF in WPS Office: Launch WPS Office and open your PDF document using the built-in PDF tool.
  2. 2. Navigate to the Form Tab: Click on the 'Form' tab on the top ribbon to access the interactive field creation tools.
  3. 3. Insert and Configure Checkboxes: Select the 'Checkbox' or 'Radio Button' icon to draw fields on your page, then double-click them to configure their properties and groupings.
Easily align, group, and manage checkboxes and radio buttons.Fully compatible with Adobe Acrobat PDF form formats and structures.Intuitive interface for modifying form field properties and appearance.Lightweight, fast, and free to download for Windows, Mac, and mobile.
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't my JavaScript working when I open the PDF in a web browser?

Many built-in web browser PDF readers (like Chrome or Edge) and basic mobile PDF viewers have limited or no support for Acrobat JavaScript. To ensure form scripts run correctly, users should open the file in a dedicated PDF application like WPS PDF or Adobe Acrobat.

What is the difference between making a checkbox read-only and hiding it?

A read-only checkbox remains visible on the document but prevents the user from clicking or changing its state. A hidden checkbox is completely removed from view. Both states can be controlled dynamically via JavaScript using `readonly = true` or `display = display.hidden`.

Can I deselect other checkboxes instead of making them read-only?

Yes. In your JavaScript, instead of changing the `readonly` property, you can change the field's value. For example, use `this.getField('Checkbox2').value = 'Off';` to automatically uncheck 'Checkbox2' when the primary checkbox is selected.