Expand my Community achievements bar.

SOLVED

Does a Signature Field Have a Signature?

Avatar

Level 2

I have a form with 2 signature fields.  I want to make sure that the first Signature Field has a signature in it before the second can be entered.  I think I would use a script in the Pre-Sign event, but I don't know what property to check, or what event to fire off.  Any ideas?  Thanks.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I have attached a sample form that checks if a signature field is signed (based on a button click).  You should be able to use the code on any event.

The code is:

var oState = event.target.getField("form1[0].#subform[0].SignatureField1[0]").signatureInfo().status; // Get the current field's signed state.
if (oState == 0) {
    app.alert("The Signature is missing");
}

Regards

Steve

View solution in original post

5 Replies

Avatar

Level 7

In the enter event of the 2nd signature field, you could put in a script like:

if (signature1.rawValue == null){

     xfa.host.setFocus(signature1);

}

This checks to see whether or not the first signature field has a value in it and directs the cursor to that field if it's empty. Signature fields might be a little different than ordinary fields though, so you should be sure to test this thoroughly.

Avatar

Level 2

I tried that and Signature1.rawValue is null, even if there is a signature there.

Avatar

Correct answer by
Former Community Member

I have attached a sample form that checks if a signature field is signed (based on a button click).  You should be able to use the code on any event.

The code is:

var oState = event.target.getField("form1[0].#subform[0].SignatureField1[0]").signatureInfo().status; // Get the current field's signed state.
if (oState == 0) {
    app.alert("The Signature is missing");
}

Regards

Steve

Avatar

Level 1

how might one do the same thing with vba question mark... im opening hundreds of pdfs with signatures in them, and i want to check if all signatures are signed, and if not, how many are left over to sign.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----