Entering an email Body into a Form email Javascript

New Here ,
Sep 23, 2019

Copy link to clipboard

Copied

Hi, I'm trying to make an Javascript button event that will send an email and a PDF form. I have the form properly emailing, and the subject line is dynamically updated with whatever is in the field "What do you want the report to show or compare" but I can't figure out what to enter to make the body of the email read the same thing every time.

 

I just need it to run a little disclaimer for the submitter and it'd read something like "Click send to complete form transmission" I have tried cBody and cMsg but don't know how to get those to both work. If it matters, I'm trying the cBody after the cSubject. I am very new to Javascript. Thanks.

Here is what I have working so far:

 

"this.mailDoc({cTo: "example@work.com",
cSubject: this.getField("What do you want the report to show or compare")
.valueAsString});"

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, PDF forms

Views

65

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Entering an email Body into a Form email Javascript

New Here ,
Sep 23, 2019

Copy link to clipboard

Copied

Hi, I'm trying to make an Javascript button event that will send an email and a PDF form. I have the form properly emailing, and the subject line is dynamically updated with whatever is in the field "What do you want the report to show or compare" but I can't figure out what to enter to make the body of the email read the same thing every time.

 

I just need it to run a little disclaimer for the submitter and it'd read something like "Click send to complete form transmission" I have tried cBody and cMsg but don't know how to get those to both work. If it matters, I'm trying the cBody after the cSubject. I am very new to Javascript. Thanks.

Here is what I have working so far:

 

"this.mailDoc({cTo: "example@work.com",
cSubject: this.getField("What do you want the report to show or compare")
.valueAsString});"

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, PDF forms

Views

66

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 23, 2019 0
Engaged ,
Sep 26, 2019

Copy link to clipboard

Copied

Hi deantripp,

Here is an article covering this topic that should be helpful in explaingin how this works.

https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

Hope this helps,

Dimitri

www.pdfscripting.com

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
New Here ,
Sep 30, 2019

Copy link to clipboard

Copied

Hi Dimitri, I couldn't get this to work for my specific needs unfortunately. I'd come across it before but I don't need that many unique boxes to populate. I can't get my message back, I wonder if it's either about the prefix (cBody vs cMsg or something else) or if it's how I follow the message. Like: '+ ' '&' 'and' ';' ',' or '.' I am not sure what is the right way to put things together.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 30, 2019 0