PDF Editing Issues

Automatically Fill PDF Form Fields from a Selected Name in Adobe Acrobat

Ayan MasoodAyan Masood Nov 19, 2026 868 views

Question details

Populate personnel fields in a PDF form when a person's name is entered or selected.

Automatically Fill PDF Form Fields from a Selected Name
Product
PDF form software, such as Adobe Acrobat
Device & OS
not provided
Scenario
A user selects or enters a name in a PDF form and needs the related identification number, first name, position, and other details filled in.
Observed behavior
The desired result is for the form to look up the selected person and fill the corresponding fields automatically.
Before you start

Prepare a personnel list with a unique key for each person and the values to populate. In Acrobat, create the name and destination fields and check their exact field names under Prepare a form.

Solution 1Recommended

Use an Acrobat form script to look up personnel details

Use an embedded lookup table for a small, relatively stable list of personnel records.

The form needs a data source; Acrobat cannot infer personnel details from a name alone. The example embeds records in the script, so anyone who can inspect the PDF may be able to see them.

The example uses a dropdown named PersonName and text fields named IDNumber, FirstName, and Position. If names are not unique, use a unique identifier as the dropdown value instead.

1
Create the form fields

Open the PDF in Adobe Acrobat and choose All tools > Prepare a form. Add a dropdown named PersonName and text fields named IDNumber, FirstName, and Position.

2
Add name choices

Open the PersonName dropdown properties and use the Options tab to add each person. Make each export value match the corresponding lookup key, such as Mary Lee.

3
Add the lookup script

In the dropdown properties, open Validate, select Run custom validation script, and choose Edit. Paste this example, then replace its sample records with your own: var records = { "Mary Lee": {id: "1001", first: "Mary", position: "Coordinator"}, "Alex Kim": {id: "1002", first: "Alex", position: "Analyst"} }; var key = String(event.value); var record = Object.prototype.hasOwnProperty.call(records, key) ? records[key] : null; this.getField("IDNumber").value = record ? record.id : ""; this.getField("FirstName").value = record ? record.first : ""; this.getField("Position").value = record ? record.position : "";

4
Test the form

Save the PDF, leave form-editing mode, and select each name in PersonName. Check that the three fields change correctly and that an unmatched or cleared value clears them.

Use an Acrobat form script to look up personnel details
Viewer and privacy limitations: Test the saved form in the PDF viewers your recipients use; some viewers do not support Acrobat form JavaScript. For sensitive or frequently changing records, consider a connected form service instead of embedding the data in the PDF.
Free Microsoft Office alternative

Work with PDF Forms and Personnel Lists in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for working with PDFs and personnel lists. It supports common Microsoft Office formats for easier migration, but it does not replace the Acrobat script setup described above.

Open and fill PDF forms alongside personnel listsCompatible with Microsoft Word DOCX and Excel XLSX filesFamiliar interface for moving between documents and spreadsheetsFree, lightweight alternative for everyday Office work
microsoft office alternative - wps office

Frequently Asked Questions

Can a PDF fill in personnel details from a name without a data source?

No. The form needs records to look up, such as an embedded JavaScript table or a connected form service. Acrobat cannot infer an identification number or position from a name.

Can users type a name instead of selecting one?

In Acrobat, open the dropdown's properties in Prepare a form and enable the option to let users enter custom text. The entered value must match a lookup key for the example script to find a record.

What happens if two people have the same name?

Use a unique identifier as the dropdown export value and lookup key. Add those values in the dropdown's Options tab and use the same keys in the script.

Why does the form work in Acrobat but not in a browser?

Some browser PDF viewers do not support Acrobat form JavaScript. Open the saved PDF in Acrobat or Acrobat Reader and test the dropdown there, then verify it in any viewer your recipients plan to use.