3 Replies Latest reply on Mar 7, 2011 10:19 AM by philmodjunk

    Disabling a button

    MeyyappanARUNACHALAM

      Title

      Disabling a button

      Post

      I have a push-button on my layout. This button can be clicked only once. So I have to disable it once I click it. I read through the previous posts and there were some suggestions to use conditional formatting. My question is what option should I choose in conditional formatting that can identify that the button has been clicked once? I am really confused here. Your help is appreciated.

      PS: I actually have 3 push buttons in the same layout (sorry I should have mentiond this before). I tried the option suggested by deshawn jackson. It works for the frst time. but the moment I click on the second button, the first button becomes normal (as the value of the push button haschanged )

        • 1. Re: Disabling a button
          DeShawnJackson

          You could add a field in your table, say, Pushed (type = number ). Then run a script that will insert the value 1 into the field once the button is pushed. Each time there is an attempt to push the button, run the script to test: If [ Pushed = 1 ] or If [ Pushed ] (same thing).

          • 2. Re: Disabling a button
            Sorbsbuster

            You can also make the button a container.  Have another global field, with several repetitions.  Set into one repetition an image of the button icon, and into another the image faded to grey.  Set the container field that is to be your button to be a calculation field, and set it to be the true image or the faded image depending on the value of 'Pushed'.  In your script give the user a custom dialogue to explain to them why their click didn't appear to do anything!

            • 3. Re: Disabling a button
              philmodjunk

              If you just want to grey out the button's label text to show it is in "disabled" status, you can use conditional formatting to check the same field in order to control the text color. You can also include calulations in tool tips to display different text depending on whether the button is or is not "disabled".