Copy link to clipboard
Copied
Hi All,
Bit of a noob when it comes to JavaScript so any help for dummies would be greatly appreciated.
I'm trying to configure my email submit button on a form.
Current Script I have is:
this.submitForm({
cURL: "mailto:email1@hotmail.com?&cc=email2@hotmail.com;email3@hotmail.com;email4@hotmail.com;email5@hotmai...",
cSubmitAs: "PDF"
});
I have to be able to add form fields (hospital & commencement are the field names) into the subject and also potentially the Body as well as some hardcoded text.
Is there an easy was to configure this using that script?
Thanks,
Chris
1 Correct answer
Please try copying the code provided in the article and modifying it for you own purpose. Note the structure of the code. Each piece of the email URL (to, cc, body and subject) is created individually from fields on the form, then concatonated into the URL string. For your purpose, remove the bits you are not using.
If you run into a problem, then post the code and an explanation of the problem here so we can help you with the specific issue.
Copy link to clipboard
Copied
Here's an article on exactly this topic:
https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
I did read that, but maybe since I'm not a coder by title I got a little confused, will have another look.
Copy link to clipboard
Copied
Please try copying the code provided in the article and modifying it for you own purpose. Note the structure of the code. Each piece of the email URL (to, cc, body and subject) is created individually from fields on the form, then concatonated into the URL string. For your purpose, remove the bits you are not using.
If you run into a problem, then post the code and an explanation of the problem here so we can help you with the specific issue.
Use the Acrobat JavaScript Reference early and often

