Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Validate A Signature

Avatar

Level 5

There are a number of threads on this subject of Validation Signature, however I haven't figured out where I am making a mistake on this validation script from researching them. I wish to validate that the document has been signed in the signature field before allowing a button to be visible for submission. I am using Microsoft XP + LiveCycle ES2 Version 9.0  + Acrobat Pro X 10.1.4

SignatureValidate.JPG

var oState = xfa.resolveNode("form1[0].SignatureField1[0]").signatureValidate();

if (oState != 4)

{

xfa.host.messageBox("The document has not been signed or the validity of the signature can not be ascertained.");

}

else

{

form1.Button2.presence = "visible"

};

After signing the document the console gives a result of:

GeneralError: Operation failed.

XFAObject.signatureValidate:1:XFA:form1[0]:SignatureField1[0]:postSign

Invalid property get operation; field doesn't have property 'signatureValidate'

Testing in the console for a value of oState by highlighting the variable oState:

oState is not defined

1:Console:Exec

ReferenceError: oState is not defined

1:Console:Exec

undefined

Where is this validation process going wrong? Thanks for your help.

1 Reply

Avatar

Level 2

You have to use the Acrobat getField method to access signatureValidate. Since it's an Acrobat method rather than an XFA method, you put event.target at the beginning of the reference.

var oState = event.target.getField("form1[0].SignatureField[0]").signatureValidate();