Having trouble with some script

Community Beginner ,
Mar 14, 2021 Mar 14, 2021

Copy link to clipboard

Copied

Hi there,

 

I have this script but get an error

 

this.mailDoc({

bUI: false,

cTo: this.getField("Email_2").value,
cCc: this.getField("Email").value,

cSubject: "Examination Submition#"+this.getField("Studio Name").value,
cMsg: "Good day#"+ this.getField("Examiner").value\n\n + "Attached please find our Examination Entries for#”+this.getField("Date from").value +this.getField("Date to").value,\n\n+ "Best regards",\n\n

+this.getField("Contact Person")\n
+this.getField("Studio Name")

});

 

what am I doing wrong

Regards

TOPICS
PDF forms

Views

152

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
Adobe Community Professional ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

What error does you get?

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
Community Beginner ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

Hi Bernd

I have change the code to this but it does not want to send the emails


var cToAddr = this.getField("Email_2").value;

var cCCAddr = this.getField("Email").value;



var cSubLine = "Examination Entries" + this.getField("Studio_Name").value;
var cBody = "Good day.\n" + "Attached please find our Examination Entries.\n\n" + "Best Regards\n" + this.getField("Contact_Person").value; + this.getField("Studio Name").value;


this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});

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
Adobe Community Professional ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

Check the Javascript console for errors.

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 ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

Please answer the question exactly: what error do you get? Programmers need to pay full attention to the details of errors.

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 ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

All instances of "\n" must be in quotes. It's a string.

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
Community Beginner ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

Thank you so much, I also miss typed one of the text fields

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