PDF Editing Issues

How to Create a PDF Order Form with Conditional Email Recipients

Camila MilosovichCamila Milosovich Nov 3, 2026 869 views

Question details

The user needs to build a dynamic PDF order form where selecting certain checkboxes automatically assigns specific email addresses as the recipients for the form submission.

Create a PDF Order Form with Conditional Email Recipients
Product
PDF
Device & OS
not provided
Scenario
Setting up a dynamic PDF form with conditional logic to route submitted data to different email addresses based on user selections.
Observed behavior
The form must evaluate checkbox inputs, compile a recipient list, and transmit the required fields to the dynamically generated email addresses.
Before you start

Ensure you are using a professional PDF editor that supports JavaScript execution and interactive form field configuration.

Solution 1Recommended

Configure Dynamic Emails using JavaScript and the submitForm Method

Apply a custom JavaScript action to the form's submit button to dynamically calculate the destination email address based on which checkboxes are selected.

To achieve dynamic email routing in a PDF form, standard submit actions are not enough. You must use JavaScript to check the status of specific fields (like checkboxes) and construct the target 'mailto:' string before calling the submission method.

1
Set up form fields

Open your PDF form in edit mode. Ensure that your checkboxes and required input fields have unique, identifiable names (e.g., 'DepartmentA_Checkbox').

2
Access submit button properties

Right-click the 'Submit' button on your form, select 'Properties', and navigate to the 'Actions' tab.

3
Add a JavaScript action

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

4
Write the conditional logic

In the JavaScript editor, write a script to evaluate the checkboxes. For example: define a variable, check if 'this.getField("Checkbox1").value !== "Off"', and append the corresponding email address to your variable.

5
Execute the submitForm method

At the end of your script, call the submit method using your dynamic email string: this.submitForm({cURL: 'mailto:' + dynamicEmailString, cSubmitAs: 'PDF'});

JavaScript Support: Advanced JavaScript features like dynamic submitForm may behave differently depending on the user's default PDF viewer. Always test the form in a standard, script-supported PDF reader.

Create and Manage Interactive PDF Forms with WPS Office

WPS Office provides a comprehensive PDF editor that allows you to easily design interactive forms, insert checkboxes, add push buttons, and manage document properties without requiring expensive alternative software.

  1. 1. Open WPS PDF: Launch WPS Office and open your document using the PDF editor.
  2. 2. Access the Form tools: Click on the 'Form' tab in the top navigation ribbon to reveal form building options.
  3. 3. Insert form controls: Select 'Check Box' or 'Push Button' and draw the field directly onto your document layout.
  4. 4. Configure field properties: Double-click the newly inserted field to access its properties, name the field, and set up export values or actions.
Easily insert interactive checkboxes, text fields, and submit buttons.Highly compatible with standard PDF formats and interactive elements.Lightweight alternative with a highly intuitive user interface for form building.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my PDF form not sending the email when the button is clicked?

This usually occurs if the end-user is opening the PDF in a web browser or a basic PDF reader that does not support JavaScript. It can also happen if their device does not have a default desktop email client (like Outlook or Apple Mail) configured to handle 'mailto:' links.

Can I specify which exact form fields are sent in the email?

Yes. When using the JavaScript submitForm method, you can use the 'aFields' parameter to pass an array of specific field names. Only the data from the fields defined in this array will be included in the submission.

Do dynamic JavaScript PDF forms work on mobile devices?

Generally, no. Most mobile PDF viewers (on iOS and Android) have limited or no support for advanced JavaScript execution such as conditional email routing. It is highly recommended that users fill out these complex forms on a desktop computer.