PDF Editing Issues

Let Users Override a Calculated Form Field in Adobe Acrobat

Huda QurayshiHuda Qurayshi Nov 19, 2026 868 views

Question details

Allow users to manually enter an IP address without having an Acrobat form calculation replace it on unrelated recalculations.

Let Users Override a Calculated Form Field in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form automatically populates an IP address based on a workstation-name field, but users also need to enter an IP address manually.
Observed behavior
The automatic population script can overwrite a manual IP address when the form recalculates or a dependent field changes.
Before you start

Open the PDF in Acrobat and identify the exact name of the workstation field and the IP address field that contains the calculation script. Confirm that the IP address field is not set to Read Only.

Solution 1Recommended

Run the IP address calculation only when the workstation field triggers it

Use this condition to prevent unrelated field changes from rerunning the automatic population code.

1
Open the form editor

In Adobe Acrobat, open the PDF and select Prepare a form from the tools.

2
Open the calculation script

Right-click the IP address field, select Properties, and open the Calculate tab. Select the option for a custom calculation script and click Edit.

3
Guard the existing code

Wrap the existing automatic population code in a source check: if (event.source != null && event.source.name == "WS Name1") { /* existing population code */ }. Replace WS Name1 with the exact name of your workstation field, and keep any assignment to event.value inside the condition.

4
Test both entry methods

Save the PDF and test the form: change the workstation field to trigger automatic population, then enter an IP address manually and change an unrelated field. Confirm that the manual entry remains.

Run the IP address calculation only when the workstation field triggers it
Changing the workstation field can still replace the value: This condition allows the automatic code to run when the named workstation field triggers the calculation. Check other scripts that write to the IP address field if a manual entry is still replaced.
Free Microsoft Office alternative

Work with PDFs and Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Microsoft Office files. It supports a straightforward move between common file formats, but it does not modify Acrobat's form calculation scripts.

Open and review PDF documents alongside office filesCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for an easier transition from Microsoft OfficeFree, lightweight suite for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Where do I find the IP address field's calculation script?

In Acrobat, open Prepare a form, right-click the IP address field, and select Properties. On the Calculate tab, open the custom calculation script using Edit.

Why does the condition check whether event.source is null?

Some calculation events may not have a source field. Checking event.source != null before accessing its name avoids trying to read a property from a null value.

Will a manual IP address survive a change to the workstation name?

Not necessarily. The guarded population code still runs when the named workstation field triggers the calculation, so it may replace the manual IP address.

What should I check if the field still overwrites manual entries?

Check the Calculate script for assignments outside the condition, and inspect other field or document scripts that write to the IP address field. Also confirm that the source field name exactly matches the name in the condition.