Expand my Community achievements bar.

how can I determine if a signature field is signed?

Avatar

Former Community Member
Hi All. I have a signature field that I wish to use as an implicit "approval" indicator if signed.



That is, if signed, my workflow would generate an accept email. If not signed, a rejection email will be sent.



I am trying to determine via Java Script during the submit action if my signature field is signed so as to assign "Accept" or "Reject" to a hidden text field. This text field is then part of my form data that the remainder of the workflow can use to decide the accept vs reject email.



The problem is that while the JS guides for Acrobat discuss things like signatureInfo() methods and such for signature fields, XFA signature fields do not seem to have these methods.



So maybe I cannot use this approach. But then my general question is simply: in a workflow, how can I tell if my signature field was signed at all? Is there a QPAC, some appropriate java script, whatever?



Stumped,

Ray Blaak
2 Replies

Avatar

Former Community Member
If you have LiveCycle Security Server, then yes, there is a QPAC. Otherwise, you can use the same Acrobat JavaScript method in teh Acrobat JS guide to check the signature field.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
The problem turned out to be that the sig fields described in the JS guide don't apply to the XFA signature fields. The trick is to get the underlying (FDF?) field, e.g.



// My designer signature field is:

var xfaSigField = topmostSubform.Page1.Layer.ReviewerSignature;



// So I get the underlying field instead:

var doc = event.target;

var sigField = doc.getField("topmostSubform[0].Page1[0].Layer[0].ReviewerSignature[0]");

if (sigField.signatureValidate() <= 0)

{

// Not signed.

reviewAction.rawValue = "Reject";

}

else

{

// Assume signed.

reviewAction.rawValue = "Accept";

}