PDF Editing Issues

Override Calculated Form Fields in Adobe Acrobat Pro

Adam DavisAdam Davis Nov 19, 2026 868 views

Question details

Allow users to enter manual values in calculated PDF form fields and return to the original formulas using a checkbox.

Override Calculated Form Fields in Adobe Acrobat Pro
Product
Adobe Acrobat Pro 2017
Device & OS
not provided
Scenario
A PDF form has calculated fields that users sometimes need to override manually.
Observed behavior
The desired form lets users switch between manual entry and calculated results without removing the calculation scripts.
Before you start

Open the PDF in Acrobat Pro and choose Tools > Prepare Form. Identify the exact names of the checkbox, calculated fields, and fields used in each formula.

Solution 1Recommended

Use a checkbox to switch between manual and calculated values

Use this approach when a checkbox should enable manual entry and restore the calculation when cleared.

The example uses a checkbox named Override, a calculated field named Total, and source fields named Quantity and UnitPrice. Replace those names and the example formula with the ones in your form.

Keep the formula in the field's custom calculation script. The script assigns the current field value when override is enabled and the formula result when it is disabled.

1
Prepare the fields

In Tools > Prepare Form, add a checkbox named Override or open the existing checkbox's Properties to confirm its name and export value. Open the Total field's Properties and select Read Only so it starts locked when the checkbox is unchecked.

2
Add the calculation script

Open Total Properties > Calculate, select Custom calculation script, and click Edit. Enter: var override = this.getField("Override").value !== "Off"; var total = this.getField("Total"); if (override) { event.value = total.value; } else { event.value = (Number(this.getField("Quantity").value) || 0) * (Number(this.getField("UnitPrice").value) || 0); }

3
Add the checkbox action

Open Override Properties > Actions. Select Mouse Up as the trigger and Run a JavaScript as the action, then click Add. Enter: var manual = this.getField("Override").value !== "Off"; this.getField("Total").readonly = !manual; this.calculateNow();

4
Test both modes

Close Prepare Form, check Override, and enter a value in Total. Change a source field to verify the manual value remains. Clear Override and confirm Total becomes read-only and recalculates from Quantity and UnitPrice.

Use a checkbox to switch between manual and calculated values
Check field names and checkbox values: An unchecked Acrobat checkbox commonly returns "Off" with a capital O. Use the exact field names and checkbox values defined in your form. For multiple calculated fields, add the appropriate calculation script and read-only control for each field.
Free Microsoft Office alternative

Work with PDF and Office files in WPS Office

WPS Office is a free, lightweight, easy-to-use alternative for everyday document work, with a familiar interface and support for common Office formats to make migration straightforward. Acrobat-specific form calculation scripts should be configured and tested in Acrobat.

Open and work with PDF documents alongside Office filesCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for a smooth transition from Microsoft OfficeFree and lightweight tools for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Why does the checkbox script use "Off" instead of "off"?

Acrobat commonly returns the case-sensitive value "Off" when a checkbox is unchecked. Check the checkbox's Properties and use the values defined for your form.

Can I restore a formula by commenting it out?

No. Acrobat will not automatically restore a commented-out formula. Keep the formula in the field's custom calculation script and use a condition to select the manual or calculated value.

Where do I put the calculation script?

In Tools > Prepare Form, open the calculated field's Properties, select Calculate > Custom calculation script, and click Edit.

How do I apply the override to more than one field?

Add conditional calculation logic to each field's Calculate action. In the checkbox's Mouse Up JavaScript, set the readonly property for each affected field, then call this.calculateNow(). Test each field in both modes.