PDF Editing Issues

Allow Manual Overrides for Calculated Form Fields in Adobe Acrobat

John WilsonJohn Wilson Nov 18, 2026 868 views

Question details

Allow users to manually edit an account-number field after Acrobat automatically populates it based on the selected manufacturer.

Allow Manual Overrides for Calculated Form Fields in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form uses a manufacturer field to assign an account number, but users also need to enter or correct the number manually.
Observed behavior
A calculation on the account-number field can overwrite a user's manual input.
Before you start

Open the form in Adobe Acrobat and check the exact names of the manufacturer and account-number fields in Prepare a form. Confirm that you can edit the form's field properties and that JavaScript is enabled.

Solution 1Recommended

Move the calculation to the manufacturer field's validation script

Use this approach to populate the account number when the manufacturer changes while allowing users to edit the account number afterward.

The source field's validation script reads the selected manufacturer from event.value and writes the matching result to the account-number field. A later change to the manufacturer can overwrite a manual account number.

1
Open the form editor

In Adobe Acrobat, open the PDF and select All tools > Prepare a form. Locate the fields named OS Product Manufacturer.1 and OSAccount Number.

2
Remove the target calculation

Open Properties for OSAccount Number, select the Calculate tab, and remove the calculation script that overwrites manual input. On the General tab, make sure Read Only is not selected.

3
Add a validation script

Open Properties for OS Product Manufacturer.1, select the Validate tab, choose Run custom validation script, and click Edit. For the supplied example, enter: var fieldA = this.getField("OSAccount Number"); if (event.value === "Alden Optical") fieldA.value = "1";

4
Adapt the mapping

In the script editor, replace the example manufacturer and account number with the values used by your form, and add conditions for any other manufacturers. Keep the target field name exactly as shown in its Properties.

5
Test the form

Save the script and PDF, exit Prepare a form, and select a manufacturer. After the account number is populated, type a different value into OSAccount Number and confirm it remains until the manufacturer is changed again.

Move the calculation to the manufacturer field's validation script
Check other scripts: Other calculations or scripts that write to OSAccount Number can still replace manual entries. The example leaves the current value unchanged when the manufacturer does not match.
Free Microsoft Office alternative

Fill PDF forms and work with Office files in WPS Office

WPS Office is a free, lightweight alternative for everyday document and PDF work, with a familiar interface and support for common Office formats to make migration easier. It does not fix Acrobat's calculation script; test your PDF's interactive fields and JavaScript behavior before relying on it.

Fill supported interactive PDF form fieldsOpen and edit compatible Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday office tasksWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does my manual account number get replaced?

A calculation script on the account-number field may recalculate its value. In Prepare a form, open the field's Properties and check the Calculate tab for a script that writes the value.

Will changing the manufacturer overwrite a manual entry?

It can. The manufacturer field's validation script assigns a new account number when the selected value matches a condition, so a later manufacturer change can replace the manual entry.

What does event.value represent in the validation script?

In the manufacturer field's validation script, event.value is the value being validated for that field. Compare it with each manufacturer value to decide which account number to assign.

Why can't I type in the account-number field?

In Prepare a form, open the account-number field's Properties and check that Read Only is not selected on the General tab. Also check whether another script is resetting the field.