Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Signature status

Avatar

Level 2

I have a form with two signature fields.

When I click the "Print" button, I want to check that both the signatures or none of them are signed: what do I write in event "prePrint"? that is, how can I check if the two signatures are filled? I don't care if the certificates are trusted or not, only if they are filled.

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 6

On click of the print button u can check the status of the signature(s)  and code with ur needs depending on the status.

Attachements are disabled so unable to attach here.

Code placed on Click event of the print button.

-------------

try{
var getSigField = event.target.getField("form1[0].Page1[0].SignatureField1[0]");
var oState =getSigField.signatureValidate();

// Get the current field's signed state.
if (oState == 0) {
    app.alert("Not Signed");
} else {
     app.alert("Document Signed");
}
}
catch(e){app.alert(e)}

--------------------

Hope this will help.

RAGHU.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 6

On click of the print button u can check the status of the signature(s)  and code with ur needs depending on the status.

Attachements are disabled so unable to attach here.

Code placed on Click event of the print button.

-------------

try{
var getSigField = event.target.getField("form1[0].Page1[0].SignatureField1[0]");
var oState =getSigField.signatureValidate();

// Get the current field's signed state.
if (oState == 0) {
    app.alert("Not Signed");
} else {
     app.alert("Document Signed");
}
}
catch(e){app.alert(e)}

--------------------

Hope this will help.

RAGHU.

Avatar

Level 4

How do you validate more than one signature on the page?