Can someone help me with the script below, I can't make it to work!!!!!
This I try to achive is after printing, to email the form as PDF.
For Click event in a PRINT Button:
form1.subALL.Submit.Print::click - (JavaScript, client)
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
Also into the same PRINT Button for PostPrint event :
form1.subALL.Submit.Print::postPrint - (JavaScript, client)
{
xfa.host.messageBox("You are about to Email the form\n\nThank you!","EMAIL FORM",3);
var DropList =Drop_1.rawValue;
var subjectbody = "?subject=" + DropList + "&body=Hello!";
Email_Button.resolveNode("#event.#submit").target = "mailto:" + "xxx@xxxx.org" + ";" + subjectbody;
Email_Button.resolveNode("#event.#submit").embedPDF = "0";
Email_Button.resolveNode("#event.#submit").format = "pdf";
Email_Button.execEvent("click");
}
There is also a Email Submit Button(Email_Button), HIDDEN from layout
with Email address:xxx@xxxx.org
THANKs