1 Reply Latest reply on Feb 12, 2014 8:38 AM by George_Johnson

    Making a button visible if another button is clicked

    grtalk

      I have a form that involves multiple submissions across departments. How would I code it so that the second Submit button is invisible until the first Submit button is clicked? Likewise, I'm wanting the first Submit button (the initially visible one) to become invisible when it is clicked. So basically, I only want to have one Submit button visible at a time. I see where the stock actions for buttons allow me to show/hide a field, but I see nothing equivalent for a button.

        • 1. Re: Making a button visible if another button is clicked
          George_Johnson MVP & Adobe Community Professional

          A button is a field. You can also use JavaScript, for example, the following code in the Mouse Up event of a button:

           

          // Hide this button

          event.target.display = display.hidden;

           

          // Show another button

          getField("Submit2").display = display.visible;

           

          // Show another button, but make it non-printing

          getField("Submit3").display = display.noPrint;

           

           

          But I don't think it is a good idea to do this. Consider what will happen if the first email is canceled or otherwise fails for some reason. The user would likely want to try again but won't be able to if the submit button is no longer available, unless you provide some means to undo the hiding/showing of the submit buttons.