PDF Editing Issues

Calculate Selected PDF Form Fields with Unique Names in Adobe Acrobat

Bushra ParveenBushra Parveen Nov 19, 2026 868 views

Question details

The user needs to calculate selected PDF form fields without including other fields that currently have the same name.

Calculate Selected PDF Form Fields with Unique Names in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form contains repeated field widgets, but only some should contribute to a calculation.
Observed behavior
Widgets with the same field name share one value, so they cannot be calculated independently.
Before you start

Open the PDF in Adobe Acrobat and check that you can access Prepare a form. Identify the fields that need independent values and the field that should display the result.

Solution 1Recommended

Give independent fields unique names and calculate the selected values

Use unique field names when only certain fields should contribute to a calculation.

Same-named widgets represent the same form field and remain synchronized. Keep the same name only where repeated widgets should display the same value.

1
Open the form editor

Open the PDF in Acrobat, then select All tools > Prepare a form. Select the PDF if prompted.

2
Assign unique field names

Select each field that needs an independent value, open its Properties, and change its Name on the General tab, for example to Amount1 or Amount2. Leave intentionally synchronized widgets with the same name.

3
Open the result field settings

Double-click the field that should display the total. In its Properties dialog, open the Calculate tab and select Custom calculation script, then select Edit.

4
Reference only the required fields

In the JavaScript editor, enter a calculation such as: event.value = (Number(this.getField("Amount1").value) || 0) + (Number(this.getField("Amount2").value) || 0); Replace the example names with the exact names of the fields to include, then save the script.

5
Test the calculation

Close the properties dialog, preview the form, and enter values in the included and excluded fields. Confirm that only the named fields affect the result, then save the PDF.

Give independent fields unique names and calculate the selected values
If renaming affects every copy: If changing a name renames all widgets of the shared field, delete and recreate the widgets that need independent values, assigning each a unique name.
Free Microsoft Office alternative

Work with PDF and Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility makes it easier to move existing files into your workflow; it does not change how Acrobat handles same-named form fields.

Open PDFs and use familiar viewing and annotation toolsWork with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXMove existing Office files into a familiar, easy-to-use workspaceUse a lightweight office suite with a free version
microsoft office alternative - wps office

Frequently Asked Questions

Why do same-named PDF fields show the same value?

In Acrobat, same-named widgets are appearances of one form field, so their values stay synchronized. Give fields unique names in Prepare a form when they need independent values.

Can I exclude one same-named widget from a calculation?

Not independently: the widgets share one field value. Give the widget a unique field name, then reference only the desired names in the result field's Calculate settings.

Where do I add a custom calculation script in Acrobat?

Go to All tools > Prepare a form, double-click the result field, and select Calculate > Custom calculation script > Edit.

Should every field in my PDF have a unique name?

Only fields that need independent values require unique names. Keep the same name for repeated widgets that should always display the same value.