PDF Editing Issues

Fix an Acrobat JavaScript Calculation That Leaves a Text Field Blank

Chanuka GeekiyanageChanuka Geekiyanage Nov 19, 2026 869 views

Question details

The user needs a calculated Quorum text field to display a message based on the Workers and Total fields.

Fix an Acrobat JavaScript Calculation That Leaves a Text Field Blank
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the calculation script

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.

2
Correct the script

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";

3
Save and test

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.

Correct the field names and JavaScript method
Match your form's field names: If your fields have different names, replace Workers and Total in the script with the exact names shown in their field properties. The method must be written as getField, with an uppercase F.
Free Microsoft Office alternative

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.

Open and review PDF forms alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsA familiar interface makes everyday editing easy to learnKeep common document tasks together in one lightweight office suite
microsoft office alternative - wps office

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.