Skip to main content
Participating Frequently
July 10, 2025
Answered

Using CSV table to auto-populate form based on dropdown selection

  • July 10, 2025
  • 2 replies
  • 552 views

I need to make a PDF form filable based on data I'm given in .csv format.

 

The .csv has the following headings that match what the form fields are called in the PDF.
Tail, Designation, Serial, MTOW, MLW, Noise, Full, Approach, Flyover, Overflight, and Takeoff.

 

I have a dropdown with all of the numbers in the Tail column.  What I want is the rest of the form to fill based on what is selected in the dropdown.

 

1. I have basically no javascript knowledge and was wondering if someone would be able to help me in coding this.

2. Since I may not be the one who always edits the file in the future, would it be possible to make a .bat file or something that someone could drag and drop the .csv file on and the .bat would automatically output the javascript to a .txt file that could be pasted into the PDF?

 

Thanks in advance!

Correct answer try67

1. This is not a trivial task if you don't have any JS knowledge at all.

2. You can't use a bat file for this, nor do you need to. The script doesn't need to contain the data from the CSV file. You need to attach the CSV to the PDF and then the script will read its contents and use them to populate the fields.

To update the data all you'll need to do is to replace the old CSV file with the new one, save the PDF and then re-open it, and the code will use the new data.

 

I've actually already developed a paid-for tool that will allow you to do all of that, without having to write any code.

You can find it here: https://www.try67.com/tool/acrobat-populate-fields-from-dropdown

 

2 replies

Thom Parker
Community Expert
Community Expert
August 18, 2025

There is a (paid-for) tool here that does exactly what you want. 

This tool is general purpose.

 https://www.pdfscripting.com/public/Select-and-Load-Form-Data-Tool-Description.cfm

 

This tool is a code sample that shows how it's done for a CSV with specific column names:

(it has to be modified to work with your form and CSV)

https://www.pdfscripting.com/public/ImportExport-Excel-Data-as-Text-Description.cfm

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
November 11, 2025

The licensing information for this paid tool seems to be locked behind a $150 paid membership, can you tell me how much the tool actually is?

Thom Parker
Community Expert
Community Expert
November 11, 2025

The JavaScript Acrobat Automation tools (and web tools) on the site are included with the membership.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 10, 2025

1. This is not a trivial task if you don't have any JS knowledge at all.

2. You can't use a bat file for this, nor do you need to. The script doesn't need to contain the data from the CSV file. You need to attach the CSV to the PDF and then the script will read its contents and use them to populate the fields.

To update the data all you'll need to do is to replace the old CSV file with the new one, save the PDF and then re-open it, and the code will use the new data.

 

I've actually already developed a paid-for tool that will allow you to do all of that, without having to write any code.

You can find it here: https://www.try67.com/tool/acrobat-populate-fields-from-dropdown