1 Reply Latest reply on Jul 29, 2009 10:24 AM by ginnyX

    Hiding a Button Conditionally?

    ginnyX

      I have a form where you can click a button to add a duplicate page, and click another button to remove a duplicate page if needed. The buttons work just fine, but now I'm wanting to hide the Remove button on the original first page.

       

      My add button has the following programming: Content.Pages.instanceManager.addInstance()

       

      My remove button has the following programming: Content.Pages.instanceManager.removeInstance(this.parent.index)

       

      I have experimented with the following: if this.parent.index < 1 {
      form1.Contents.Content.Pages.RemoveContent(this.parent.index).presence='invisible';
      }

       

      But it doesn't seem to work, no matter where I put it. I get error messages, so I took it out. I have also attached the form I'm working on.

       

      I'm using Adobe LiveCycle Designer 8.0 Any help is greatly appreciated!

        • 1. Re: Hiding a Button Conditionally?
          ginnyX Level 1

          Figured it out by playing myself, and with the help of a coworker. By putting the following code:

           

          if (this.parent.index < 1) then
              RemoveContents.presence="invisible"
              endif

           

          in the calculate area for the button programming, it works! Just in case anyone else runs into this.