Calculate Selected PDF Form Fields with Unique Names in Adobe Acrobat
Question details
The user needs to calculate selected PDF form fields without including other fields that currently have the same name.

- 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.
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.
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.
Open the PDF in Acrobat, then select All tools > Prepare a form. Select the PDF if prompted.
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.
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.
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.
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.

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.

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.




