cancel
Showing results for 
Search instead for 
Did you mean: 

Validate of Digital Signature if blank

Former Member
0 Kudos

Hi,

How can I control that only the signer can clear the digital signature & how can we determine if signature is blank... ?

Thanks...

Edited by: Marc Ng on Jan 12, 2009 8:33 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marc,

You can use Sign and Lock field available in WD Native controls in library. This fiels contains following script:

var oSOM = this.somExpression; // Returns the full SOM expression i.e. xfa[0].form[0].form1[0]...

var truncSOM = oSOM.substring(15); // Truncating 'xfa[0].form[0]' from SOM to get acroforms name of the field.

var oState = event.target.getField(truncSOM).signatureValidate(); // Get the current field's signed state.

If oState is 4 means Sign. field has been signed. 0 indicates field is empty.

Second point, I am also searching solution for this. If you find anything please let me know.

Regards,

Amit

Former Member
0 Kudos

Hi Amit,

Thanks for the helpful tip, do you know how to access those variables in a calling program?

Former Member
0 Kudos

You cannot use these var from calling programs. One way can be, you create a variable, and then set this variables value according to the value of the oState.

For your second issue, hve you tried to disable the Sign field after signing. This will not allow user to clear the Sign value. Please check it and let me know also.

Regards,

Amit

Former Member
0 Kudos

Hi Amit,

How can we assign the value of ostate to a variable? Do we need to use script editor for that? For the second issue I think it might work...

Former Member
0 Kudos

Yeah you have to write the code in Script editor because its JavaScript, and then assign the value of oState to any variable available in the Dataview.

Hope this helps.

Amit

Former Member
0 Kudos

Do you a sample script that passes value to a field in the data view? I tried using a script that pops error message when the signature is blank however is pop up whenever i save the pdf. Iam not sure where to place this script to a event.