Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Digital Signature Field == null

Avatar

Level 5

I created a button that will only execute if the digital signature field has been signed. However even when the signature field is signed use of the button after the signature still pops up with the scripted message "This document has not been signed yet.".

I have the button excluded from locking after signature.

Here is how I wrote the checking script.

//checks if form has been signed

if (form1.Page1.SignatureData.CASignature.rawValue == null)

              {

                 xfa.host.messageBox("This document has not been signed yet.");

              }

else

{ /// some code that excutes fine without the if statement above}

;

Any ideas on what I could do to check if this digital signature field is signed? Thanks.

4 Replies

Avatar

Level 6

That doesn't work to determine if a signature field is signed. This previous thread might help: http://forums.adobe.com/thread/694165

Avatar

Level 5

I am having some difficulty with the answer given as correct in the link above. The code:

var oState = event.target.getField("form1.SignatureField1").signatureValidate();

if (oState != 0)

{      signedFlag.mandatory = "disabled";

}

else

{      signedFlag.mandatory = "error";

}

Thru some test I have run I can't get a value for oState. Is there a typo in this coding that prevents the var oState from running?

Avatar

Level 6

You would have to change the name of the field in the getField method to match the name of your signature field. In your case, you would want to set the mandatory property, just check the return value.

Avatar

Level 5

George,

I can't get the first line to fire in LiveCycle Designer ES 2.0

I created a new file with only three items. 1. Text field named "signedFlag" made "User Entered - Required" in the Object + Value tab.

2. A signature field named "SignatureField1" that doesn't lock anything after signature. 3. A button with the script:

form1.Button1::click - (JavaScript, client)

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

var oState = event.target.getField("form1.SignatureField1").signatureValidate();

if (oState != 0)

{      signedFlag.mandatory = "disabled";

xfa.host.messageBox("Congratulations your button worked.","Winner! Winner! Chicken Dinner!",3,2);

}

else

{      signedFlag.mandatory = "error";

       xfa.host.messageBox("This required box in red above is not completed.","Warning",3,2);

}

;

I created the xfa.host.messageBox for either case being succesful, "disabled" or "error" so I could see if the script was firing after signing the document and then clicking the button. With or without these messageBoxes the var oState doesn't seem to be working. Any ideas?

I changed the names in my scirpinting so I know, names are not the problem as you mentioned previously. Thank you for your time.

SignatureScreenShote.JPG