Skip navigation
Argonous
Currently Being Moderated

Disable a Signature after Validating Multiple Text Boxes

Aug 23, 2012 12:49 PM

Hello All,

 

I am pretty new to LiveCycle and all the code behind it, but I have managed to cobble together a form that will suit my needs.

 

I have put in place a "check" on both my print button and signature field to make sure that at least 13 text boxes on the form contain the required information.  The Print button works fine, but my last stumbling block is the signature field.  When using the same if statement in the PreSign event, the blank test fields are highlighted and the error message is displayed, but the user can still sign the document.

 

How can I disable the signing of the document after the validation checks are completed?

 

If it matters, below is an example (1 of the 13) of the iff statements I am using in both the Print Button Click event and the Siganture PreSign event.

 

 

if ((txtContact.rawValue==null) || (txtContact.rawValue=="")) {

app.alert("Please enter the Contact Name.");

txtContact.ui.oneOfChild.border.fill.color.value = "255,200,200";

}

else {

txtContact.ui.oneOfChild.border.fill.color.value = "255,255,255";

}

 

Thanks much!

 

Shane

 
Replies
  • Currently Being Moderated
    Aug 30, 2012 1:57 PM   in reply to Argonous

    Hi,

     

    You can use the below code in presign event of signature field to cancel sign if the txtcontact value is null.

     

    xfa.event.cancelAction = true ;

     

    The complete code would be as below :-

     

    if(txtContact.rawValue==null)
    {
    app.alert("Please enter the Contact Name.");

    xfa.event.cancelAction = true;

    }

     

    --- Hope this resolves your issue.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (1)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points