How to Require at Least One Checkbox or Field in PDF Forms
Question details
The user needs to enforce a validation rule in a fillable PDF form where at least one checkbox from a group, or at least one specific text field (like a permit number), must be filled before submission.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating or managing a fillable PDF form that requires conditional user input validation before successful submission.
- Observed behavior
- Native PDF form field settings cannot group independent checkboxes to require just one. Without custom validation, users can submit the form without providing the necessary minimum selection.
Ensure your PDF editor supports JavaScript for custom form validation, and note down the exact field names of the checkboxes and text boxes you want to validate.
Add JavaScript Validation to the Submit Button
Since independent checkboxes cannot natively be made required as a single group, use a custom JavaScript routine triggered by the Submit button to verify selections.
By attaching a script to the 'Mouse Up' event of your form's Submit button, you can evaluate the state of multiple fields at once. The script counts how many target checkboxes are ticked and checks if the permit number fields contain text. If the criteria are not met, the script halts the submission process and alerts the user.
Enter the form editing mode in your PDF software. Right-click the 'Submit' button and select 'Properties'.
Navigate to the 'Actions' tab. Select 'Mouse Up' as the Trigger, and choose 'Run a JavaScript' from the Select Action dropdown menu.
Click 'Add' to open the JavaScript Editor. Write a script that retrieves the values of your checkboxes and permit number fields. For example, use a loop or direct field references (e.g., this.getField('Checkbox1').value) to check if at least one checkbox is not equal to 'Off', or if the permit text field is not empty.
In your script, add an 'if' statement that checks if the valid count is zero. If true, use 'app.alert("Please select at least one checkbox or enter a permit number.")' to notify the user, and avoid calling the submitForm command so the submission is canceled.

Edit and Manage Fillable PDF Forms Seamlessly with WPS Office
WPS Office offers a comprehensive built-in PDF editor that makes reading, filling, and managing PDF forms incredibly easy. Whether you are interacting with complex checkboxes, dropdowns, or text fields, WPS Office ensures a smooth and reliable form-filling experience.
- 1. Open the PDF File: Launch WPS Office and open your fillable PDF form.
- 2. Access Form Filling: Navigate to the 'Form' or 'Fill & Sign' tab on the top ribbon to activate interactive fields.
- 3. Fill and Save: Click directly on checkboxes to select them and type into text fields, then save your completed document.

Frequently Asked Questions
Why can't I just check 'Required' in the checkbox properties?
Checking the 'Required' box in a specific checkbox's properties means that particular checkbox MUST be checked to submit the form. It cannot enforce a 'choose at least one of these options' rule across a group of independent checkboxes.
Can I use radio buttons instead to require at least one selection?
Yes. If you group radio buttons by giving them the exact same field Name (but different Export Values) and mark the group as 'Required', the user will be forced to select exactly one option from that group before submitting.
How do I find the exact field names to use in my JavaScript?
In your PDF editor's form preparation mode, look at the fields panel on the right sidebar. You will see a list of all form elements. Double-click any element to open its Properties window, where the exact 'Name' will be displayed on the General tab.




