Expand my Community achievements bar.

Unable return sucessful validate when using signature pad

Avatar

Former Community Member
I need to verify that the user signed the form. We are using a signature pad to capture the electronic signature. And then using the code below in a button to validate. If the signature is left blank I do get the message that the "Signature is not valid: signature is blank". But if I complete the signature field I do not get anything back.



var f = event.target.getField("form1[0].S1[0].SignatureField1[0]");



// Validate the signature field:

var status = f.signatureValidate();



/* signatureValidate method returns one of the following integer validity status values:

-1: not a signature field

0: signature is blank

1: unknown status

2: signature is invalid

3: signature is valid, identity of signer could not be verified

4: signature and identity of signer are both valid

*/

// Obtain the signature information

var sigInfo = f.signatureInfo();



if (status < 3)

var msg = "Signature is not valid: " + sigInfo.statusText;

else

var msg = "Signature is valid: " + sigInfo.statusText;

// Display the status message:

app.alert(msg);;

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



I have also tried just returning the status using

app.alert("Signature status: " + status);

When I leave the signature blank I get "Signature status: 0"

When I fill in the signature, I don't get the message box.



Is there another command for validating with a signature pad.



Thanks,

Velvet
1 Reply

Avatar

Former Community Member
try using the status property. This is currently working for me.



var oState = event.target.getField(("form1[0].S1[0].SignatureField1[0]").signatureInfo().status;