PDF Editing Issues

How to Access Duplicate PDF Form Fields with #0 and #1 Suffixes

Huma Ashraf ChHuma Ashraf Ch Oct 28, 2026 869 views

Question details

The user needs to retrieve values from duplicate PDF form fields that automatically generate #0 and #1 suffixes in their names, preventing standard programmatic access.

How to Access Duplicate PDF Form Fields with #0 and #1 Suffixes
Product
PDF
Device & OS
not provided
Scenario
Using code (such as JavaScript) to extract data or interact with duplicated form widgets in a PDF document.
Observed behavior
Form fields append #0 and #1 to their names, causing programmatic access attempts that include the suffixed names to fail.
Before you start

Ensure you have access to a PDF editor to inspect the form field properties and verify whether the duplicated fields are meant to share the same value or operate independently.

Solution 1Recommended

Retrieve the Shared Value Using the Base Field Name

Use this method when the duplicate fields are intended to mirror the exact same data across different parts of the PDF.

When form fields in a PDF are duplicated, they often share the same underlying field name but are visually represented as multiple widgets identified by #0, #1, and so on. Because they share a single data source, you cannot target the suffix directly via code.

1
Identify the base field name

Open your PDF in edit mode and check the field properties. Note the base name, ignoring the #0 or #1 suffix altogether.

2
Write the JavaScript method

In your PDF JavaScript console or external processing script, use the getField() method targeting only the base name.

3
Execute the script

Run a command such as this.getField("BaseFieldName").value; to successfully retrieve the shared value of the duplicated widgets.

Retrieve the Shared Value Using the Base Field Name
Value Mirroring: Any changes made to widget #0 will automatically mirror to widget #1 since they point to the exact same underlying form object.
Professional PDF Form Editor

Easily Manage and Edit PDF Form Fields with WPS Office

WPS Office provides a comprehensive PDF toolkit that allows you to easily create, edit, rename, and manage PDF form fields. Avoid naming conflicts and ensure your data extraction works flawlessly with its intuitive form editing features.

  1. 1. Open the PDF in WPS Office: Launch WPS Office and open your PDF document containing the duplicate fields.
  2. 2. Enter Form Edit Mode: Navigate to the Form tab and select Edit Form to view all interactive fields and their current names.
  3. 3. Modify Field Properties: Right-click the problematic fields, select Properties, and uniquely rename them or verify their base names for your scripts.
Easily view and modify PDF form field properties to fix duplication issues.Fully compatible with standard PDF formats and JavaScript form actions.Lightweight application with a seamless user interface for rapid PDF editing.
microsoft office alternative - wps office

Frequently Asked Questions

Why do PDF form fields automatically add a #0 or #1 to their names?

This happens when you copy and paste a form field or duplicate a page containing form fields. The PDF format treats them as multiple visual representations (widgets) of a single underlying data field, assigning suffixes to differentiate them visually while keeping their data linked.

Can I assign different values to fields that share the same base name?

No. Fields with the same base name (even with different # suffixes) are designed to mirror the exact same data. To hold different values, you must manually rename the fields in your PDF editor so they each have unique names.

Does WPS Office support editing PDF form field names?

Yes, WPS Office includes a built-in PDF editor where you can access form editing tools, inspect field properties, and easily rename duplicate fields to resolve scripting conflicts.