Copy link to clipboard
Copied
Hello,
If i have a drop down that has yes and no in it can I adjust the email body to show pre determined information if no is selected?
i.e.
Are there scratches in panel work? "NO"
Email body: Warning, there are scratches in panel work
etc.
You can use something like this:
var emailBody = "";
if (this.getField("Are there scratches in panel work?").valueAsString=="NO")
emailBody = "Warning, there are scratches in panel work";
this.mailDoc({cTo: "me@server.com", cSubject: "Email subject goes here", cMsg: emailBody});
Copy link to clipboard
Copied
Sure. Use this:
if (this.getField("Text3").valueAsString!="")
emailBody +=this.getField("Text3").valueAsString;
Copy link to clipboard
Copied
I cant seem to get it to work? is it becuse it will only add the information from the text field if its blank?
Copy link to clipboard
Copied
My apologies, it is adding it straight onto the last line of the "no" values so i assume i need to use the following code?:
if (this.getField("Text3").valueAsString!="")
emailBody += \n this.getField("Text3").valueAsString;
Copy link to clipboard
Copied
Almost... Try this:
emailBody += "\n" + this.getField("Text3").valueAsString;
Copy link to clipboard
Copied
is there anyway to put a space beneath the text field too?
Copy link to clipboard
Copied
emailBody += "\n" + this.getField("Text3").valueAsString + "\n\n";