PDF Editing Issues

How to Set a Second PDF Checkbox Group from Another Group's Value

Muhammad TalhaMuhammad Talha Nov 3, 2026 868 views

Question details

The user needs to automatically copy the selected export value from one PDF checkbox group to a second checkbox group using a calculation script.

How to Set a Second PDF Checkbox Group from Another Group's Value
Product
PDF Editor
Device & OS
not provided
Scenario
Creating interactive PDF forms and automating data entry by linking the selections of two different checkbox groups.
Observed behavior
Looking for a working JavaScript method to transfer a selected checkbox value to another calculated field or checkbox group.
Before you start

Ensure you have access to a PDF editor with form editing capabilities and verify that the export values in both of your checkbox groups match exactly before applying the script.

Solution 1Recommended

Use a Calculation Script with a Hidden Text Field

Implement a JavaScript calculation to automatically transfer the value from the source checkbox group to the destination checkbox group.

By using a hidden text field or a calculated field, you can pull the export value from the primary checkbox group and assign it to the secondary group. It is crucial that both groups share the exact same export values for the sync to function correctly.

1
Open form editing mode

Open your PDF document in your PDF editor and enter the form editing or prepare form mode.

2
Add a hidden text field

Insert a new text field into your document. Set its properties to 'Hidden' so it does not display on the final form.

3
Access calculate properties

Right-click the hidden text field, select 'Properties', and navigate to the 'Calculate' tab.

4
Enter the custom script

Select 'Custom calculation script' and enter the following code: this.getField("Joint1Type").value = this.getField("AccountOwnershipType").value; (Replace 'Joint1Type' with your destination field and 'AccountOwnershipType' with your source field).

5
Save and test

Exit form editing mode, save your document, and test the primary checkbox group to ensure the secondary group updates accordingly.

Use a Calculation Script with a Hidden Text Field
Script Execution Notice: Calculation scripts run automatically when field values change. Test the form thoroughly to ensure there are no conflicts with other event scripts or calculations.
Advanced PDF Form Editing

Automate PDF Forms Effortlessly with WPS Office

WPS Office provides robust PDF editing capabilities, allowing you to create, modify, and manage interactive PDF forms effortlessly. Easily add checkboxes, text fields, and configure form properties for automated workflows.

  1. 1. Open your PDF: Launch WPS Office and open the PDF document you wish to turn into an interactive form.
  2. 2. Navigate to the Form tab: Click on the 'Form' tab on the top ribbon to reveal the interactive form editing tools.
  3. 3. Insert form fields: Select 'Check Box' or 'Text Field' from the menu and click on the page to place your form elements.
  4. 4. Configure properties: Double-click or right-click the inserted field to modify its properties, set export values, and customize formatting.
Easily insert and customize interactive form fields like checkboxes, radio buttons, and text boxes.Fully compatible with standard Adobe Acrobat PDF form formats and logic.Lightweight software with an intuitive interface for quick form creation and editing.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my second checkbox group not updating after adding the script?

Ensure that the export values in both checkbox groups match exactly. If the destination group does not have a matching export value assigned to one of its checkboxes, the script will not be able to apply the selection.

Can I use this script for radio buttons instead of checkboxes?

Yes, the exact same logic applies to radio button groups. You can transfer the selection by matching the export values of the radio buttons and using the same this.getField script.

Where exactly do I paste the custom calculation script?

In form editing mode, right-click the field you are using as the trigger (often a hidden text field), select 'Properties', go to the 'Calculate' tab, choose 'Custom calculation script', and paste your JavaScript code there.