Skip to main content
Participant
February 13, 2025
Answered

Adobe Form JavaScript

  • February 13, 2025
  • 2 replies
  • 653 views

Can someone help me figure out a javascript for my form?

 

I have a submit button on my adobe form, but I am trying to figure out the script to change the body of the email that is populated once the person filling the form out clicks submit. 

 

I found this script on a forum, but I cant get it to work. 

var cToAddr = "maria@titan.net";

var cSubLine = "Dielectric Testing Information";

var cBody = "Please note, we have changes to our testing preferences.";

 

So I would like to have the email sent to myself (maria@titan.net), the subject line to say "Dielectric Testing Information", and then the body of the email to say "Please note, we have changes to our testing preferences."

 

Any help is much appriciated!!

Correct answer PDF Automation Station

Do you want the form emailed?  Use this:

this.mailDoc({cTo:"maria@titan.net", cSubject: "Dielectric Testing Information",  cMsg:"Please note, we have changes to our testing preferences."});

2 replies

Thom Parker
Community Expert
Community Expert
February 13, 2025
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
PDF Automation Station
Community Expert
Community Expert
February 13, 2025

Do you want the form emailed?  Use this:

this.mailDoc({cTo:"maria@titan.net", cSubject: "Dielectric Testing Information",  cMsg:"Please note, we have changes to our testing preferences."});

Participant
February 13, 2025

Yes, I would like for it to open up a new email and automatically attach the full PDF once the submit button is clicked. 

PDF Automation Station
Community Expert
Community Expert
February 13, 2025

Use the script I provided.