Customizing an email Subject line with field from .pdf form
I found a couple of discussions that previously described how to do this using Java script which I am not fluent in. I tried to use the commands as given but I'm getting an error message when I try to save the instructions in Adobe Acrobat. I code I used was:
var emailSubject = "Certificate " + TextField1.rawValue + ".pdf";
event.target.mailDoc({
bUI: false,
cTo: to,
cCC: cc,
cSubject: emailSubject,
cMsg: emailMsg,
cSubmitAs: "PDF"
});
The error message I get is Reference error: invalid assignment left-hand side 1: at line 2 (and it highlights line 2)
Any thoughts as to what I am doing incorrectly and how to fix?
Thanks.
var emailSubject = "Certificate " + TextField1.rawValue + ".pdf";
event.target.mailDoc({
bUI: false,
cTo: to,
cCC: cc,
cSubject: emailSubject,
cMsg: emailMsg,
cSubmitAs: "PDF"
});