Java script help

New Here ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

I'm having an issue with my Javascript (Please see at bottom)

 

Every time I put any email address in LMEmail or Submitters Email and both it won't open up outlook but if I leave them empty my Javascript will work.

 

If someone could tell me why this is and how to fix it would be amzaing.

 

// This is the form return email. It's hardcoded
// so that the form is always returned to the same address.
// Change address on your form to match the code below
var cToAddr = this.getField("LMEmail").value;

// First, get the client CC email address
var cCCAddr = this.getField("Submitters Email").value;

// Set the subject and body text for the email message
var cSubLine = this.getField("Date Signed").value+"_"+this.getField("Contact Name").value+"_"+this.getField("Unit Ref").value+"_"+this.getField("StartDate").value;
var cBody = "Thank you for submitting your FMT1000.\n" + "If you require a copy of the form please save the attachment for your own records"

// Send the entire PDF as a file attachment on an email
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});

 

TOPICS
JavaScript, PDF forms

Views

86

Likes

translate

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
community guidelines
Most Valuable Participant ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

There are errors in the file and in the code. Open the JS Console to see them.

Likes

translate

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
community guidelines
New Here ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Sorry uploaded the wrong document

Likes

translate

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
community guidelines