PDF Editing Issues

Populate Email Recipients from an Acrobat Form Submit Button

Amos GikundaAmos Gikunda Nov 19, 2026 868 views

Question details

The user needs an Acrobat form button to populate email recipients based on a dropdown selection and attach the PDF.

Populate Email Recipients from an Acrobat Form Submit Button
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form uses a dropdown to determine who should receive the form by email.
Observed behavior
The form opens an email with the PDF attached, but the To field is empty.
Before you start

Check the exact dropdown field name and its option values in Acrobat's Prepare a Form tool. Confirm that Acrobat JavaScript is enabled and that a desktop email client is configured.

Solution 1Recommended

Use one JavaScript action to select recipients and email the PDF

Use this approach when the button must choose recipients based on a dropdown and attach the current PDF.

The example uses a dropdown named ApprovalStatus with values Approved and Rejected. Replace the field name, values, and example email addresses with those used in your form.

1
Open the button properties

In desktop Acrobat, open the PDF, select Prepare a Form, and double-click the submit button to open its properties.

2
Replace conflicting actions

On the Actions tab, select the Mouse Up trigger. Remove any separate Submit a Form action that uses a mailto address, then select Run a JavaScript and click Add.

3
Add the recipient script

In the JavaScript editor, enter the following script and replace the example values: var field = this.getField("ApprovalStatus"); if (!field) { app.alert("The ApprovalStatus field was not found."); } else { var recipients = ""; if (field.valueAsString === "Approved") { recipients = "approved@example.com"; } else if (field.valueAsString === "Rejected") { recipients = "review@example.com"; } if (recipients) { this.mailDoc({bUI: true, cTo: recipients, cSubject: "Completed form"}); } else { app.alert("Select a valid approval status before submitting."); } }

4
Save and test the form

Close the button properties, save the PDF, and test each dropdown option in desktop Acrobat. Click the submit button and check the To field and PDF attachment in the email window.

Use one JavaScript action to select recipients and email the PDF
Check the email client: The mailDoc action relies on Acrobat's email integration. If no email window opens, check the configured desktop email client and Acrobat's JavaScript settings.
Free Microsoft Office alternative

Edit PDFs and Office files with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. It does not fix Acrobat's JavaScript or email integration, but it can help you manage everyday documents as you move between applications.

Open and work with PDF documents alongside Office files.Compatible with Microsoft Office formats including DOCX, XLSX, and PPTX.Use a familiar interface to transition between Office applications.Access a free, lightweight suite for everyday document work.
QA img-9

Frequently Asked Questions

Why does the email open with an empty To field?

Check that the JavaScript uses the exact dropdown field name and option values. In the button's Actions tab, remove any separate Submit a Form mailto action that could open another email or override the recipient data.

Where can I find the dropdown field name?

In Acrobat, open Prepare a Form and double-click the dropdown. Check its name in the field properties and use that exact name in this.getField().

How do I enable JavaScript in Acrobat?

Open Acrobat's Preferences, select JavaScript, and check that Acrobat JavaScript is enabled. Reopen the form and test the button in desktop Acrobat.

Can the button send the PDF to more than one person?

Yes. Set the script's recipients variable to the required addresses, separated by commas, before passing it to the cTo parameter in mailDoc.