PDF Editing Issues

How to Populate a Delivery Charge Field Using Radio Buttons in Acrobat

Muhammad TalhaMuhammad Talha Oct 28, 2026 869 views

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.

How to Populate a Delivery Charge Field Using Radio Buttons in PDF Forms
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.
Before you start

Verify that all the radio buttons for shipping costs share the exact same Group Name before applying any calculation scripts.

Solution 1Recommended

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.

1
Set Radio Button Group Names

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').

2
Assign Specific Price Values

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.

3
Open Target Field Properties

Right-click the separate text field where the delivery charge should appear and select 'Properties'.

4
Add Calculation Script

Go to the 'Calculate' tab, choose 'Custom calculation script', and click the 'Edit' button.

5
Enter the JavaScript Code

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.

Configure Choice Values and Add a Custom Calculation Script
Format for Currency: To display the currency symbol in the final text field, go to its 'Format' tab, choose 'Number' as the format category, and select your desired currency symbol.
Advanced PDF Editor

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. 1. Open WPS Office: Launch WPS Office and drag your interactive PDF form directly into the application workspace.
  2. 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. 3. Fill Out the Form: Click on the corresponding radio buttons to select shipping options and watch the integrated calculation fields update instantly.
  4. 4. Save and Export: Once completed, easily save the document or export it securely to share with clients or colleagues.
Easily fill and manage interactive PDF order formsHighly compatible with standard Adobe Acrobat PDF formatLightweight, fast, and user-friendly document interfaceIncludes comprehensive Word, Excel, and PowerPoint alternatives
microsoft office alternative - wps office

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.