Other PDF Issues

How to Select Checkboxes Based on Text Field Ranges in Adobe Acrobat

Huma Ashraf ChHuma Ashraf Ch Nov 5, 2026 869 views

Question details

The user needs a method to automatically select specific checkboxes in a PDF form based on the numeric values entered into a text field.

How to Select Checkboxes Based on Text Field Ranges in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Designing a dynamic interactive PDF form where checkboxes must respond to defined ranges (e.g., 1-5, 6-32) entered into a corresponding text field.
Observed behavior
The checkboxes need to toggle to their 'Yes' export state when the inputted text matches their assigned numeric range and revert to 'Off' when the field is empty or out of range.
Before you start

Verify the exact names and export values of your checkboxes in the PDF form properties, as the JavaScript validation script relies on accurate field mapping to function properly.

Solution 1Recommended

Apply Custom JavaScript for Multiple Checkboxes

Use a custom JavaScript validation script on the text field to automatically toggle specific checkboxes based on the exact numeric input.

By applying a custom validation script to the source text field, Adobe Acrobat can evaluate the input value dynamically. The script retrieves the value upon entry and assigns a checked ('Yes') or unchecked ('Off') state to target checkboxes via their field names.

1
Enter Prepare Form Mode

Open your document in Adobe Acrobat, navigate to the Tools menu, and select 'Prepare Form' to enable form field editing.

2
Access Text Field Properties

Right-click the text field where users will enter the numeric ranges and select 'Properties' from the context menu.

3
Add Validation Script

Go to the 'Validate' tab, choose 'Run custom validation script', and click the 'Edit' button.

4
Input the Range Logic

Paste the following evaluation logic: this.getField('1').value = event.value == 1 ? 'Yes' : 'Off'; Repeat this for values 2 through 5. For the range 6 to 32, use: this.getField('6').value = (event.value >= 6) && (event.value <= 32) ? 'Yes' : 'Off';

5
Save and Test

Click 'OK' to save the script, close the properties window, and test your form by entering numbers in the text field to observe the checkboxes.

Apply Custom JavaScript for Multiple Checkboxes
Custom Export Values: If your checkboxes use a custom export value instead of the default 'Yes', ensure you replace 'Yes' in the script with your specific export value string.
Advanced PDF Form Management

Create and Manage Fillable PDF Forms with WPS Office

WPS Office provides a highly compatible PDF editor that allows you to seamlessly design interactive forms, insert checkboxes, and manage text fields without complex software configurations.

  1. 1. Launch WPS PDF: Open WPS Office and select the PDF module to load your document.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to view all interactive control options.
  3. 3. Insert Checkboxes and Fields: Select 'Check Box' or 'Text Field' and click on the page to place them. Double-click the fields to adjust their properties and export values.
  4. 4. Save and Distribute: Once your fillable form is organized, save the PDF to easily share it for data collection.
Easily insert text fields, checkboxes, and interactive controls.Highly compatible with standard Adobe PDF form formats.Streamlined, user-friendly interface for quick document setup.Lightweight alternative for everyday office and PDF management.
microsoft office alternative - wps office

Frequently Asked Questions

Why aren't my Acrobat checkboxes updating when I type in the text field?

Ensure your JavaScript validation script is applied directly to the text field's 'Validate' tab, not the checkbox itself. Additionally, verify that the field names referenced in your script accurately match the names of the checkboxes in your document.

What is the default export value for checkboxes in Adobe Acrobat?

By default, the export value for a checked box in Acrobat is 'Yes'. If you changed this value during the creation of your form, you must update your JavaScript to use that custom string instead of 'Yes'.

How do I clear checkboxes when the text field is empty?

Your JavaScript condition must account for an empty string or values outside the designated range. Using a ternary operator like `event.value == 1 ? 'Yes' : 'Off'` automatically assigns the 'Off' state (clearing the checkbox) if the condition is not met.