PDF Editing Issues

Calculate a Risk Category from Drop-Down Fields in Adobe Acrobat

Kushani NimanthikaKushani Nimanthika Nov 19, 2026 869 views

Question details

The user wants a third Acrobat form field to display a risk category based on two drop-down selections.

Calculate a Risk Category from Drop-Down Fields in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form contains Consequence and Likelihood drop-down fields with values from 1 to 5.
Observed behavior
The risk field should multiply the selected values and display the corresponding category automatically.
Before you start

Open the form in Adobe Acrobat Pro and check the exact names of the Consequence and Likelihood fields. Confirm that their drop-down export values are numeric values from 1 to 5.

Solution 1Recommended

Add a Custom Calculation Script to the Risk Field

Use this method to calculate a risk category directly from the two drop-down selections.

The example multiplies the two values and assigns Extreme for scores of 15 or more, High for 8–14, Moderate for 4–7, and Low for scores below 4. Adjust these thresholds to match your risk matrix.

1
Open the form editor

Open the PDF in Acrobat Pro and select All tools > Prepare a form.

2
Check the drop-down fields

Double-click each drop-down field to open Properties. Check its name on the General tab and its numeric export values on the Options tab.

3
Open the risk field calculation

Double-click the text field that should display the risk category. On the Calculate tab, select Custom calculation script and click Edit.

4
Enter the script

Paste this script, replacing the field names if yours are different: var consequence = this.getField("Consequence").valueAsString; var likelihood = this.getField("Likelihood").valueAsString; var c = Number(consequence); var l = Number(likelihood); if (consequence === "" || likelihood === "" || isNaN(c) || isNaN(l) || c < 1 || c > 5 || l < 1 || l > 5) { event.value = ""; } else { var score = c * l; event.value = score >= 15 ? "Extreme" : score >= 8 ? "High" : score >= 4 ? "Moderate" : "Low"; }

5
Test the calculation

Save the script, close Properties, and select Preview in Prepare a form. Choose values in both drop-downs and verify that the risk field displays the expected category.

Add a Custom Calculation Script to the Risk Field
Check PDF viewer support: The calculation relies on PDF JavaScript. Some PDF viewers may not run it, so test the completed form in the viewer your recipients will use.
Free Microsoft Office alternative

Work with PDF and Office Files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDF and Office files. Its format compatibility makes it easy to move between office suites; use Adobe Acrobat for the custom form calculation described above.

Open and review PDF documents alongside office filesWork with Microsoft Office formats, including DOCX, XLSX, and PPTXUse a familiar interface for a smoother move from Microsoft OfficeAccess document, spreadsheet, and presentation tools in one lightweight suite
microsoft office alternative - wps office

Frequently Asked Questions

Why is my risk field blank?

In Acrobat's Prepare a form tool, check that the script uses the exact field names and that both selected export values are numbers from 1 to 5. The example script leaves the result blank when either value is missing or invalid.

Can I change the risk category thresholds?

Yes. Open the risk field's Properties > Calculate > Custom calculation script > Edit, then change the score comparisons to match your risk matrix. Keep the comparisons in descending order.

Where do I set a drop-down item's numeric value?

In Prepare a form, double-click the drop-down field and open the Options tab. Check or edit the export value for each item so the calculation receives the intended number.

Will the calculation work in every PDF viewer?

No. The script requires a PDF viewer that supports the relevant PDF JavaScript calculation features. Test the saved form in the viewer recipients will use.