• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Java script help

Community Beginner ,
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

279

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
Community Expert ,
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.

Votes

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
Community Beginner ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

LATEST

Sorry uploaded the wrong document

Votes

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