Copy link to clipboard
Copied
I have an adobe acrobat DC form. On the form is a submit button. This opens up internal email account and attaches the file to an email address that I have set up. I now want to add an email address into the CC of the email which needs to be taken from a name on the form that has been entered.
Thanks
It's not JavaScript, actually, but if you need the value to come from a field then you do need to use JavaScript.
You can use something like this:
var ccAddress = this.getField("BCC").valueAsString;
this.mailDoc({cTo: "me@server.com", cSubject: "Email subject line", cCc: ccAddress});
Copy link to clipboard
Copied
If you're using the mailto syntax you can learn how to do it here, for example:
Copy link to clipboard
Copied
Hi. I have looked at that link, and as Im not really into coding and javascript, it looks like I can only enter one email address.
I need the link to pull the email name from a field on the form, if that makes sense.
Thanks
Ann
Copy link to clipboard
Copied
It's not JavaScript, actually, but if you need the value to come from a field then you do need to use JavaScript.
You can use something like this:
var ccAddress = this.getField("BCC").valueAsString;
this.mailDoc({cTo: "me@server.com", cSubject: "Email subject line", cCc: ccAddress});
Copy link to clipboard
Copied
Brilliant.!!!!!!!!!!!
This has worked for me. I just need to try and figure out how I can add a standard message into the body of the email. Do you know how this can be done?
Thanks for your help. 🙂
Copy link to clipboard
Copied
To get the standard message into the body of the email, please try this :
var ccAddresses = this.getField("<NAME OF YOUR TEXT BOX>").value;
this.mailDoc({cTo:"abc@server.com", cSubject: "<SUBJECT LINE>", cCc: ccAddresses, cMsg: "<Body>"});
Copy link to clipboard
Copied
Fabulous :-). My form is now fully working and ready for roll out. Thanks for your help.
Regards,
Copy link to clipboard
Copied
This page may help you generate a custom mailto JavaScript command:
www.fdftoolkit.net/email-pdf-mailto-generator.aspx
Copy link to clipboard
Copied
In your PDF form, fill your text box containing the CC addresses with the semi-colon separated values.
And then use the below java script code to associate it with your submit button :
var ccAddresses = this.getField("<NAME OF YOUR TEXT BOX>").value;
this.mailDoc({cTo:"abc@server.com", cSubject: "<SUBJECT LINE>", cCc: ccAddresses});
Please let me know if it doesn't work for you.