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});
Copy link to clipboard
Copied
There are errors in the file and in the code. Open the JS Console to see them.
Copy link to clipboard
Copied