How to Let Users Enter a Custom Email Address in PDF Forms
Question details
The form creator needs a way for users to enter their own recipient email address when clicking the submit button on a PDF form, rather than sending the data to a hardcoded email address.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating an interactive PDF form where the submission destination varies depending on user input.
- Observed behavior
- By default, PDF submit buttons use a static email address. The creator needs a dynamic solution to prompt the user or pull an email address from a field right before the form is submitted.
Ensure you are using a professional PDF editor capable of adding and editing form controls and executing custom JavaScript, as standard PDF readers cannot create dynamic submit actions.
Use Custom JavaScript to Dynamically Set the Submit Email
Attach a JavaScript action to your submit button that prompts the user for an email address and dynamically generates the mailto: submission link.
Because the standard submit action properties in Acrobat only accept a static URL or email address, you must override the button's default behavior using document-level or button-level JavaScript. This allows the PDF to capture user input at the exact moment of submission and route the form data accordingly.
Open your PDF form in Adobe Acrobat Pro, go to the Tools menu, and select 'Prepare Form'.
Right-click the Submit button you placed on the page and select 'Properties' from the context menu.
Navigate to the 'Actions' tab. Under 'Select Action', choose 'Run a JavaScript', and then click the 'Add' button.
In the JavaScript Editor window, use the app.response() method to prompt the user for an email address. Assign this input to a variable, and construct your submission string (e.g., 'mailto:' + userEmail). Execute the submission using the this.submitForm() or this.mailDoc() method.
Save your PDF, exit form editing mode, and click the button. A popup should ask for the email address, after which your default email client will draft the message to the specified recipient.

Create and Manage Interactive PDF Forms with WPS Office
WPS Office includes a comprehensive PDF editor that allows you to create interactive forms, add text fields, and configure buttons easily without needing expensive software.
- 1. Open your PDF in WPS: Launch WPS Office, navigate to the PDF tab, and open your existing document or create a new one.
- 2. Access the Form Tools: Click on the 'Form' tab on the top ribbon to reveal the interactive form controls.
- 3. Add a Push Button: Select the 'Push Button' tool, draw it on your document page, and double-click to configure its label and action properties.
- 4. Save and Distribute: Save your newly created interactive PDF form. Anyone with a standard PDF reader can fill out the fields and trigger the buttons.

Frequently Asked Questions
Can I pull the email address from a text field instead of using a popup prompt?
Yes. Instead of using a JavaScript prompt, your script can read the value of a specific text field within the form (e.g., this.getField('RecipientEmail').value) and append that value to your mailto: action.
Why does the submit button open an email draft instead of sending it silently?
For security and privacy reasons, PDF readers cannot send emails silently in the background. Using a mailto: submit action will always hand the submission over to the user's default desktop email client (like Outlook or Apple Mail) for final review and sending.
Do custom JavaScript buttons work on mobile PDF readers?
Most mobile PDF viewers have limited or no support for executing Acrobat JavaScript. If your users primarily open forms on mobile devices, you may need to rely on standard static submit buttons or migrate to a web-based form instead.




