PDF Editing Issues

How to Email Selected PDF Form Data Without Submitting the Entire Form

Camila MilosovichCamila Milosovich Nov 2, 2026 869 views

Question details

The user needs to create an email from a fillable PDF form that includes only specific field values in the message body, rather than attaching the entire PDF or submitting all form data.

How to Email Selected PDF Form Data Without Submitting the Entire Form
Product
PDF Form Editors
Device & OS
not provided
Scenario
A user wants to selectively extract data from a completed PDF form and send just that text data via email to a client or recipient.
Observed behavior
Standard form submission buttons typically send the entire document or a complete data file. A custom solution is required to filter the data and format it into a plain email body.
Before you start

Ensure you know the exact field names in your PDF form that you want to extract, and verify that your PDF editing software supports custom JavaScript actions for form buttons.

Solution 1Recommended

Create a Custom JavaScript Email Workflow

Use a custom JavaScript action attached to a form button to collect specific field values and construct an email message body dynamically.

By default, standard submit buttons send the whole PDF or all form data. To send only specific fields without attaching the file, you can write a short JavaScript snippet that reads the selected fields, builds a text string, and triggers the user's default email client using the app.mailMsg() method.

1
Add a Custom Button

Open your PDF form in edit mode, navigate to the interactive form tools, and add a standard 'Button' to the page.

2
Access Button Properties

Right-click the newly created button and select 'Properties'. Go to the 'Actions' tab.

3
Set the Action to JavaScript

Under 'Select Action', choose 'Run a JavaScript' from the dropdown menu, and click 'Add'.

4
Write the Data Extraction Script

In the JavaScript editor, define variables to extract your specific fields. For example: var name = this.getField('ClientName').value; var amount = this.getField('TotalAmount').value;

5
Construct and Send the Email

Below your variables, add the mail trigger: app.mailMsg({bUI: true, cTo: 'client@example.com', cSubject: 'Form Data', cMsg: 'Name: ' + name + '\nAmount: ' + amount}); Click OK to save.

Create a Custom JavaScript Email Workflow
Email Client Dependency: This method relies on the user having a properly configured desktop email client (like Outlook or Apple Mail). Webmail users may need to adjust their system's default email handler.
Advanced PDF Form Management

Create and Manage Interactive PDF Forms with WPS Office

WPS Office provides a comprehensive suite of PDF tools that make it easy to create, edit, fill, and manage interactive PDF forms without requiring heavy or expensive software.

  1. 1. Open WPS PDF: Launch WPS Office and open your PDF document using the built-in PDF editor.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to view all interactive form controls.
  3. 3. Edit or Fill Fields: Click on any form field to fill out data, or use the editing tools to add new buttons and text fields.
  4. 4. Save and Share: Save your completed form or share it directly via email from within the WPS interface.
Easily insert text fields, checkboxes, and buttons into your PDF documents.Fully compatible with standard PDF forms created in Adobe Acrobat.Lightweight and user-friendly interface for seamless PDF editing.Cost-effective solution for all your document management needs.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the email open when I click the custom button?

This usually happens if you do not have a default desktop email client configured on your computer, or if your PDF viewer's security settings are blocking JavaScript execution. Check your system's default apps settings.

Can I format the extracted text in the email body?

Yes, you can use standard JavaScript string manipulation, including adding line breaks (\n) and combining text with field values, to format the message body exactly as you need.

Is it possible to attach the PDF using this JavaScript method?

Yes, if you decide you want to attach the document later, you can use the mailDoc() method instead of mailMsg(), though mailDoc() does not allow you to populate the email body text dynamically.