How to Populate a Delivery Charge Field Using Radio Buttons in Acrobat
Question details
The user needs to configure a PDF order form so that selecting a shipping cost radio button automatically populates the corresponding price into a separate Delivery Charge text field.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Designing an automated, interactive PDF order form where shipping costs dynamically update based on customer selection.
- Observed behavior
- The delivery charge text field must seamlessly reflect the price associated with the chosen shipping method radio button.
Verify that all the radio buttons for shipping costs share the exact same Group Name before applying any calculation scripts.
Configure Choice Values and Add a Custom Calculation Script
Assign specific numerical values to your radio buttons and use a custom JavaScript in the delivery field to pull the selected price.
To make a text field populate based on a radio button selection, you must first define an export value (choice value) for each radio button. Then, apply a simple calculation script to the target text field to retrieve that value.
Right-click your first shipping option radio button and select 'Properties'. Under the General tab, ensure the 'Name' field is identical for all shipping radio buttons (e.g., 'Delivery Charges').
Navigate to the 'Options' tab inside Properties. In the 'Radio Button Choice' field, enter the exact shipping price without any currency symbols (e.g., enter '15.00' instead of '$15.00'). Repeat this for every radio button in the group.
Right-click the separate text field where the delivery charge should appear and select 'Properties'.
Go to the 'Calculate' tab, choose 'Custom calculation script', and click the 'Edit' button.
Type the following script: var v = this.getField('Delivery Charges').valueAsString; event.value = (v == 'Off') ? '' : v; (Note: Replace 'Delivery Charges' with your actual radio button group name). Click OK to save.

Manage and Fill Interactive PDF Forms with WPS Office
WPS Office provides a comprehensive, lightweight PDF editor that allows you to seamlessly fill out interactive forms, edit PDF content, and manage document workflows without relying on heavy or expensive software.
- 1. Open WPS Office: Launch WPS Office and drag your interactive PDF form directly into the application workspace.
- 2. Access Interactive Elements: Navigate through the PDF using the intuitive viewer. Active fields like text boxes, radio buttons, and checkboxes will be highlighted.
- 3. Fill Out the Form: Click on the corresponding radio buttons to select shipping options and watch the integrated calculation fields update instantly.
- 4. Save and Export: Once completed, easily save the document or export it securely to share with clients or colleagues.

Frequently Asked Questions
Why is my delivery charge field showing 'Off' instead of the selected price?
This occurs when a radio button does not have a specific value assigned to it. Ensure you define the numerical price in the 'Radio Button Choice' field under the Options tab in the radio button's Properties.
Can I include the currency symbol in the radio button choice value?
It is highly recommended to input only numbers (without currency symbols) into the choice value so calculation scripts can parse the data correctly. You can automatically format the resulting Delivery Charge text field to display a currency symbol via its Format tab.
Why isn't the custom calculation script updating the target field?
Double-check the field name referenced in your script. The name inside the getField() function must perfectly match the exact name of your radio button group, including precise capitalization and spacing.




