PDF Editing Issues

Set Acrobat Form Text Based on Radio Button Values

Nimra MalikNimra Malik Nov 19, 2026 868 views

Question details

Set a PDF form's rating text according to a calculated score, with an override for three specific radio-button selections.

Set Acrobat Form Text Based on Radio Button Values
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A form calculates a score and displays a potential rating based on that score and three radio-button groups.
Observed behavior
The rating should always display “Grow With Role” when all three specified selections have an export value of 1, regardless of the score.
Before you start

In Acrobat's Prepare a Form tool, check the exact field names and export values of the three radio-button options. Confirm that the Score field calculates a numeric value before the rating field is evaluated.

Solution 1Recommended

Add an override to the rating field's calculation script

Check the three selected radio-button values before applying the score-based rating thresholds.

1
Open the rating field properties

Open the PDF in Acrobat, choose All tools > Prepare a form, and open Properties for the text field that displays the potential rating.

2
Add the calculation script

On the Calculate tab, select Custom calculation script and click Edit. Enter: var ad = this.getField("Advancement Drive").valueAsString; var de = this.getField("Drive to Excel").valueAsString; var dc = this.getField("Development Commitment").valueAsString; var sum = Number(this.getField("Score").valueAsString); if (ad == "AD1" && de == "DE1" && dc == "DC1") { event.value = "Grow With Role"; } else if (sum <= 17) { event.value = "Grow With Role"; } else if (sum <= 22) { event.value = "Promotable"; } else if (sum >= 23) { event.value = "High Potential"; } else { event.value = ""; }

3
Match the form's values

In the script editor, replace the example field names and AD1, DE1, and DC1 with the exact names and export values used in your form. If all three selected options use the export value 1, compare each value with "1" instead.

4
Check calculation order and test

In Prepare a Form, use Set Field Calculation Order to place Score before the rating field. Save the PDF, then select the three special options and test both a low and a high score; also test other selections against the score thresholds.

Add an override to the rating field's calculation script
Check score inputs: The script assumes Score contains a valid number. A blank score converts to 0, and a score between 22 and 23 leaves the rating blank. Adjust the validation or thresholds if those cases are possible.
Free Microsoft Office alternative

Work with PDFs and Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents and PDFs. Its format compatibility helps you move existing files into your workflow, but it does not replace Acrobat's form calculation scripting.

Open and review PDF forms alongside your documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for a smoother move from Microsoft OfficeFree, lightweight tools for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Where do I find a radio button's export value?

In Acrobat's Prepare a Form tool, open the radio button's Properties and check the export or choice value on the Options tab. Use that exact value in the script.

Why does the special rating need to be checked first?

JavaScript evaluates the conditions in order. Placing the three-radio-button condition first ensures that “Grow With Role” overrides the score-based thresholds.

What if the rating uses an old score?

In Prepare a Form, open Set Field Calculation Order and ensure that the Score field is calculated before the rating field. Then test the form again.

Can the script use the value 1 for all three radio buttons?

Yes. If the selected option in each radio-button group has the export value 1, compare each field's valueAsString with "1" instead of the example values AD1, DE1, and DC1.