Skip to main content
Participant
September 23, 2019
Question

Entering an email Body into a Form email Javascript

  • September 23, 2019
  • 1 reply
  • 708 views

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});"

This topic has been closed for replies.

1 reply

DimitriM
Inspiring
September 26, 2019

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

 

Participant
September 30, 2019
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.