Expand my Community achievements bar.

SOLVED

Prevent digital signature if fields are blank

Avatar

Level 9

I am trying to verify a few fields are populated before the user can digitally sign the form. If the fields are blank, I would like to prevent the digital signature window from appearing.  How do I do that?

Here's my script:

var vSignature
if(xfa.form.form1.execValidate() == true){
vSignature = this.rawValue;
}
else{
xfa.host.messageBox("At Least One Required Field Was Left Blank");
}

1 Accepted Solution

Avatar

Correct answer by
Employee

Add null check (or any validation of the fields that you are expecting to be populated) in the preSign event of digital signature field , if validation fails then cancel the action after providing a message

Can you attach your sample form?

--Santosh

http://about.me/nskumar

View solution in original post

6 Replies

Avatar

Correct answer by
Employee

Add null check (or any validation of the fields that you are expecting to be populated) in the preSign event of digital signature field , if validation fails then cancel the action after providing a message

Can you attach your sample form?

--Santosh

http://about.me/nskumar

Avatar

Level 9

Thank you for your reply.

Unfortunitly I can not attach a sample form. My understanding is the preSign event only works for versions 9 and higher. My form needs to be used with versions 8.1 and higher.

Avatar

Employee

Acrobat 8.x & Adobe Reader 8.x is already EOLed https://www.adobe.com/support/products/enterprise/eol/eol_matrix.html#86

Adobe Reader8.xWindows and Macintosh11/3/200611/3/2011

It's better to recommend your users to upgrade to latest versions. Is it an enterprise wide installation?

--Santosh

http://about.me/nskumar

Avatar

Level 9

Yes it is an enterprise wide installation. I will notify the Systems Group.

Thanks

Avatar

Employee

In case if you had to achieve this for Reader 8.x versions

1. You can lock the signature field on initialization or documentReady

2. Add a button for validation check

3. Do validation when the user clicks the button added in step # 2

4. If all validations are succesful then unlock the signature field

--Santosh

Avatar

Level 9

Thank you for your reply. I will give this a try.