PDF Editing Issues

Attach PDF Files Based on List Box Selections in Adobe Acrobat

Huda QurayshiHuda Qurayshi Nov 19, 2026 869 views

Question details

The user wants to attach appendix PDF files to a form according to the items selected in a list box.

Attach PDF Files Based on List Box Selections in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form offers a list of appendices, and the selected files should be attached to the form.
Observed behavior
The desired result is for the form to attach the appendix files that correspond to the user's list-box selections.
Before you start

Identify the list box's field name and export values, and map each value to an appendix file on the user's computer. Confirm that users have an Acrobat configuration that permits the required local-file access and that the appendix files are available at the expected paths.

Solution 1Recommended

Use custom Acrobat JavaScript to attach selected appendix files

Use this approach when the attachment process must respond to list-box selections and can be deployed on each user's computer.

This is a custom development task rather than a built-in list-box option. The script must map selected export values to known file paths and use Acrobat's permitted attachment methods in an appropriate trusted context.

Local file access is subject to Acrobat security restrictions. A document script alone may not have the privileges needed to import files; a developer may need to deploy a trusted function locally on each computer.

1
Configure the list box

In Acrobat, open the PDF and choose All tools > Prepare a form. Open the list box properties and check its field name, item export values, and whether multiple selections are allowed.

2
Map selections to files

Create a mapping in the custom script from each list-box export value to its corresponding local appendix PDF path. Account for different paths on different computers or distribute the files to a consistent location.

3
Develop and deploy the trusted code

Have an Acrobat JavaScript developer implement and install the required trusted code on each user's computer, following Adobe's security and deployment guidance. The code should read the field value and attach only the mapped files that the environment permits.

4
Connect a form button

In Prepare a form, add or select a button. Open Properties > Actions, select a trigger such as Mouse Up, choose Run a JavaScript, and add the document-side call to the deployed code.

5
Test and save the form

Select one or more list-box items, click the button, and check Acrobat's Attachments panel for the expected PDFs. Save the form and test missing files, different selections, and each supported user configuration.

Use custom Acrobat JavaScript to attach selected appendix files
Permissions and compatibility: The required privileges and available features depend on the Acrobat product, version, and security settings. Do not assume that an arbitrary PDF script can read local files or that the workflow will run in every PDF viewer.
Free Microsoft Office alternative

Work with PDF forms and Office files in WPS Office

WPS Office is a free, lightweight alternative for viewing and working with PDFs and Office documents. Its familiar interface and support for common Office formats make migration straightforward, although it does not replace Acrobat's trusted JavaScript attachment workflow.

View PDF forms and appendix documents in one office suiteCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar interface for working with documents and spreadsheetsFree, lightweight option for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Can an Acrobat list box attach PDFs without a script?

A list-box selection alone does not provide this conditional attachment workflow. You need custom Acrobat JavaScript to map selections to files and perform the attachment where permissions allow it.

How does the script know which appendix to attach?

The developer maps the list box's export values to known local file paths. Check or set those values in the list box properties under All tools > Prepare a form.

Does every user need the appendix files on their computer?

For a script that imports local files, each user needs access to the mapped files at paths the script can resolve. The required trusted code and permissions must also be available on that computer.

Will this workflow work in every PDF viewer?

No. Acrobat JavaScript support, local-file permissions, and attachment capabilities vary by product and version. Test the deployed form in each intended environment.