Calculate a Risk Category from Drop-Down Fields in Adobe Acrobat
Question details
The user wants a third Acrobat form field to display a risk category based on two drop-down selections.

- 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.
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.
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.
Open the PDF in Acrobat Pro and select All tools > Prepare a form.
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.
Double-click the text field that should display the risk category. On the Calculate tab, select Custom calculation script and click Edit.
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"; }
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.

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.

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.




