How to Collect PDF Selections and Send Them via Email
Question details
The user wants to create an interactive PDF where user selections (via checkboxes or buttons) are collected and formatted into an email automatically.

- Product
- Interactive PDF
- Device & OS
- not provided
- Scenario
- Creating a product order form or selection sheet within a PDF that allows users to submit their choices directly via email.
- Observed behavior
- Users need a method to capture checked items or clicked buttons and populate an email body or mailto link with the selected descriptions.
Ensure your PDF editor supports JavaScript and form field creation. Keep in mind that email submission functionality depends on the user's local PDF viewer capabilities and default email client settings.
Use Checkboxes and a JavaScript Submit Button
Collect multiple product selections using checkboxes and aggregate their details into an email body when a Submit button is clicked.
This method involves adding individual checkboxes for each product and utilizing a master Submit button. The button runs a custom JavaScript that scans which boxes are checked, compiles the associated product descriptions, and drafts an email.
Insert checkbox fields for each product in your PDF. Store the specific product description in the checkbox's 'Export Value' or 'Tooltip' property so the script can retrieve it.
Add a Push Button to the PDF document and label it 'Submit Order' or 'Send Email'.
Open the button's properties, navigate to the 'Actions' tab, choose 'Run a JavaScript' on the 'Mouse Up' trigger, and write a script that loops through your form's checkboxes to collect the checked values.
At the end of your script, use the command app.launchURL("mailto:email@example.com?subject=Order&body=" + collectedData); to open the user's email client and populate the email body.

Create Individual Buttons for Single Product Selections
If users only need to select one product at a time, you can attach an email generation script directly to individual product buttons.
Easily Create and Manage Interactive PDF Forms with WPS Office
WPS Office provides comprehensive PDF editing tools, allowing you to seamlessly insert interactive form fields like checkboxes and buttons, and easily manage complex document workflows.
- 1. Open Your PDF: Launch WPS Office and open your PDF document using the WPS PDF tool.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access the interactive form controls.
- 3. Add Fields: Select 'Check Box' or 'Push Button' and draw the fields directly onto your document layout.
- 4. Configure Properties: Right-click the newly created field, choose 'Properties', and configure the export values, tooltips, or actions.
- 5. Save and Share: Save your interactive PDF to apply the form fields and share it with your audience.

Frequently Asked Questions
Why isn't the email automatically sending in the background when I click submit?
Most PDF readers have strict security restrictions that prevent automatic background email sending. Instead, the mailto script drafts the email in the user's default email client (like Outlook or Windows Mail) for them to review and send manually.
Where can I store the product descriptions for the JavaScript to read?
You can store product descriptions in the checkbox's 'Export Value', inside the field's tooltip text, or you can hard-code the descriptions directly into your JavaScript variables.
Will this interactive PDF script work on mobile devices?
JavaScript support and mailto link behaviors vary widely across mobile PDF viewers. Complex scripts often work best on desktop readers, so it is highly recommended to test your interactive PDF on target mobile applications before distributing.




