Using script in a dummy submit button to check for digital signature

Geckoz100

10-02-2015

Is it possible to add script to a dummy submit button to stop it from submitting if a signature field is not signed?  Perhaps adding something like what I have below.  I know the syntax isn't right.  I just haven't been able to get it to work.  Thanks.

if (SignatureField1 == null)

     {

     xfa.host.messageBox("Please digitally sign before clicking Submit!");

{

Accepted Solutions (0)

Answers (2)

Answers (2)

Geckoz100

13-02-2015

Thanks, I took a look at that.  I couldn't make that solution work for me because there are four submit buttons in my form, as it passes through several reviewers.  So what I had to do is enter the code below into the Click event for each section's Submit button, so that it at least gives a reminder to sign before submitting.  It doesn't stop the e-mail from popping up, though, unfortunately.

var oState = event.target.getField("form1[0].Page4[0].DeptReview[0].EA_Signature[0]").signatureValidate()

if (oState == 0)

  {

  xfa.host.messageBox("You have not signed the form. \n\nPlease click OK and then click the signature field to sign the form. \n\nThank you!");

  }