Copy link to clipboard
Copied
I suspect this is out of my control but I'm being told by end user that when they try to submit the form the email that's popping up is in plain text but they need it to generate in html format - this is primarily so that the user signature adds automatically (assuming it is set up that way) to the email.
Is there any way to do this? Or is it a local setting I can't affect?
The code attached to the submit button checks required fields then, assuming they're complete, creates email, cc'ing up to two people who add their details to the form:
var requiredFields = new Array();
for (var i = 0; i < this.numFields; i++)
{
var fName = this.getNthFieldName(i);
var f = this.getField(fName);
if (f.type!="button" && this.getField(fName).required && (this.getField(fName).value == null || this.getField(fName).value == ''))
{
requiredFields[requiredFields.length] = fName;}}
var error = "Please complete the following fields: \n\n";
for (j=0; j < requiredFields.length; j++)
{
if (requiredFields[j].value == null)
{
error = error + requiredFields[j] + '\n';
var f2 = this.getField(requiredFields[j]);
f2.setFocus();
}
}
if (requiredFields.length > 0) {
app.alert(error);
} else {
var cToAddr = "email@companyname.co.uk";
var cCCAddr = this.getField("Email1").value;
var cArAddr = this.getField("Email2").value;
if(cArAddr != "")
cCCAddr += ";" + cArAddr;
var cSubLine = "New request form";
var cBody="Generic message here.";
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine,cMsg:cBody});
}
Copy link to clipboard
Copied
Not possible. A script can only generate a plain-text email message. If you include HTML tags in it maybe the email application you use will interpret it as an HTML page, but it's not guaranteed.
Copy link to clipboard
Copied
Not possible. A script can only generate a plain-text email message. If you include HTML tags in it maybe the email application you use will interpret it as an HTML page, but it's not guaranteed.
Copy link to clipboard
Copied
Thanks for speedy response!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now