5 Replies Latest reply on Nov 21, 2017 11:46 AM by SIPRNet11

    Open the document if other rules don't apply

    SIPRNet11 Level 1

      I have an alert in document-level that opens if a certain button is not hidden and then when that button is hidden, the alert doesn't open.  So that works fine but when I tried adding a second alert, I get issues.  What I'm trying to accomplish is there are two parts to a pdf form (PART I and PART II).  If part 1 doesn't have a button hidden, then an alert will pop up when the document is opened.  After part 1 has been digitally signed, the button will hide and that alert won't popup anymore but a second alert will pop up if part 1's button hidden AND part 2's button is not hidden.  Once part 2 has been signed, part 2's button is hidden and no more alerts should pop up.


      It all works up to the last part.  The second alert still pops up even though both buttons are hidden.  Here's my code:


      var VerifyPartI = this.getField("Verify PART I");
      var VerifyPartII = this.getField("Verify PART II");
      if (VerifyPartI.hidden == false){
      if(app.alert("Inputted text",2,1,"Title of window")!=1) this.closeDoc(true);
      } else {
      if (VerifyPartII.hidden == false && VerifyPartI.hidden == true);{
      app.alert("Inputted text",3,0,"Title of window");


      I don't know how to close this if/then statement.