Hello =)
I'm working with LiveCycle ES4 designing a form and I want my form to be filled by Adobe Reader users.
In this form, I have a signature field which I want to verify before the user submits the document.
I'm using this code in the click event of the button:
var signature = event.target.getField("Form.subForm.signature");
var signatureState = signature.signatureValidate();
if (signatureState == 0){
xfa.host.messageBox("Please sign the document.");
}
else if (signatureState == 1 || signatureState == 2){
xfa.host.messageBox("Please use a valid signature.");
}
else if (signatureState >= 3){
event.target.submitForm({cUrl:"mailto:xxxxxxxx@xxxx.xxx", cSubmitAs:"PDF"});
xfa.host.messageBox("Form submited.");
}
I've extended the features of this form in Reader using Acrobat Pro Extended.
The problem is..this line:
var signature = event.target.getField("Form.subForm.signature");
.. isn't working the way it's supposed to. When I press the button in the signed, or unsigned, document, this variable is null.
Can PLEASE anyone explain me why?