Fix an Acrobat JavaScript Calculation That Leaves a Text Field Blank
Question details
The user needs a calculated Quorum text field to display a message based on the Workers and Total fields.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A PDF form uses a custom JavaScript calculation to evaluate whether quorum requirements are met.
- Observed behavior
- The Quorum field displays no result because a field name is incorrect and the calculation order may also need adjustment.
Open the PDF in Acrobat and enter Prepare a Form so you can inspect the field names and the Quorum field's calculation script. Confirm that the form contains fields named Workers, Total, and Quorum, or note their exact names for use in the script.
Correct the field names and JavaScript method
Use this solution when the Quorum field stays blank because the script refers to a nonexistent field or uses incorrect capitalization.
In Acrobat, open Prepare a Form, right-click the Quorum field, and choose Properties. On the Calculate tab, select Custom calculation script and click Edit.
In the JavaScript editor, use the exact field names and the case-sensitive getField method. For fields named Workers and Total, enter: var WK = this.getField("Workers").value; var TL = this.getField("Total").value; event.value = (WK >= 3 && TL >= 5) ? "Quorum Requirements Met" : "Quorum Requirements NOT Met";
Click OK to close the script editor and field properties, then exit form editing or select Preview. Enter values in Workers and Total and check the Quorum result.

Set the form calculation order
Use this solution if Workers or Total are calculated fields and Quorum evaluates before their values are ready.
Use WPS Office for everyday PDF and document work
WPS Office is a free, lightweight alternative for everyday document and PDF work, with a familiar interface and Microsoft Office format compatibility for easier migration. It does not repair Acrobat's JavaScript calculation settings.

Frequently Asked Questions
Why does getfield fail in my Acrobat calculation script?
JavaScript is case-sensitive. Open the Quorum field's Properties, go to Calculate, and edit the custom script to use getField with an uppercase F.
Does the field name have to match exactly?
Yes. In Prepare a Form, check each field's name in its Properties and use that exact name in getField. For example, Workers is not the same field as Worker.
When do I need to change the calculation order?
If Workers or Total are themselves calculated fields, use More > Set Field Calculation Order in Prepare a Form and place them before Quorum.
How can I test both quorum messages?
In Preview, enter at least 3 in Workers and at least 5 in Total to test the met message. Then enter a lower value in either field to test the not-met message.




