Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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

Avatar

Level 5

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!");

{

2 Replies

Avatar

Level 5

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!");

  }