signatureInfo and send email message body
Hi All (new to this forum and to javascript).
I have created a form with 3 signature fields plus an email button.
I am able to "populate" my email with proper info, etc.
I have figured out the use of unicode to enter line breaks since with my acrobat 9 the outlook email message is by default plain text.
(i don't know how to make it "open" with a new message in HTML format)
Form is basically filled out and approved by one person then emailed upwards for 2nd approval then
upwards again for a 3rd approval. Each email to the next "approver" is on a seperate button.
(ie: To BOB, To BILL, once all 3 signatures are in - To DISTRIBUTE)
What I would like to do is add the name of the sender to my email message.
I am thinking that the best way, is to get the name of the last person to sign the PDF.
Assuming the last person to sign would have also hit the email button.
I need some help in my triggers and coding to find out which of the 3 signature fields was last entered.
I was thinking of using the OnFocus & Signed events to compare what is in the signature field.
Blank on entry, signed on exit = last person to sign the form.
For OnFocus:
var f = this.getField("FirstApproval");
var status = f.signatureValidate();
// Check the status returned from the validation:
if (status < 3){
var msg1 = "not signed yet";}
else{
var msg1 = "already signed";}
For Signed:
var f = this.getField("FirstApproval");
var sigInfo = f.signatureInfo();
var Name1 = sigInfo.name;
What I can't figure out is the scope of the variables,
how do I pass the msg1 & Name1 content to my email button script ?
So that this can be evaluated:
If(msg1 == "not signed yet"){
// add the name of the last person to sign at the end of the message body
cMessBody = cMessBody + Name1;}
Once that is sorted out, it should be some if or case statements to compare the info from all 3 signature fields
so that i use the last signed one to insert into the email message body.
Any simpler ideas to pass the user name to my email message is more than welcomed !
Thanks
