Copy link to clipboard
Copied
Hello AS Community,
as described in the subject I currently have the following issue:
I want to send the information of specific form fields (e.g. name, last name) to email address A
I want to send the information of other form fields (address, country) to email address B
All of that should happen automatically after hitting the created "Submit form" button.
It would be great if the email gets sent automatically (not only opening the email draft)
Thanks in advance!
this.submitForm({cURL: "mailto:jerry@company.com", aFields:["A","B","C"], cSubmitAs:"XML", cCharSet:"utf-8", });
this.submitForm({cURL: "mailto:larry@company.com", aFields:["D","E","F"], cSubmitAs:"XML", cCharSet:"utf-8", });
This script sends two emails. One to Jerry with an XML attachment containing fields A, B, and C. And one to Larry, who gets an email with an XML attachment containing fields D, E, and F
Copy link to clipboard
Copied
Will the form be used by just you (or a small number of users), or would you expect it to work for anyone who manages to obtain the form? You might get something to work for the former, but are unlikely to with the latter.
Copy link to clipboard
Copied
Thanks for the quick response George,
The form will only be used by a small number of users.
I am new to the Javascript world and already managed to write the code that sends the filled out form with the fields "name" and "lastName" in the subject which is exactly what i needed.
How can I send selected information to specific email addresses?
Copy link to clipboard
Copied
You can do this with a script using the "doc.submitForm()" function.
here's the reference entry:
use the "aFields" argument to set the fields.
Here's an article on using the "submitForm()" function.
https://www.acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/
Copy link to clipboard
Copied
Thank you, that looks promising
Copy link to clipboard
Copied
Hi Thom,
is it possible for you to show me the basic structure of the code? or maybe some more explanations? I should be able to adapt it to my skript then...
That would be a huuuge help!!!
Thanks in advance!
Copy link to clipboard
Copied
this.submitForm({cURL: "mailto:jerry@company.com", aFields:["A","B","C"], cSubmitAs:"XML", cCharSet:"utf-8", });
this.submitForm({cURL: "mailto:larry@company.com", aFields:["D","E","F"], cSubmitAs:"XML", cCharSet:"utf-8", });
This script sends two emails. One to Jerry with an XML attachment containing fields A, B, and C. And one to Larry, who gets an email with an XML attachment containing fields D, E, and F
Copy link to clipboard
Copied
Thats perfect, thank you so much! 🙂