Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
iswarya
Partner - Creator
Partner - Creator

enable/disable button

I am trying to disable a button when clicked and enable it when another button is clicked. I have three buttons A,B and C. E.g: When Button A is clicked it should disable and button B should enable. When B is clicked it should disable and A should enable.

1 Solution

Accepted Solutions
MarkWillems
Contributor III
Contributor III

Put an action on each button to set a variable as 1, 2 or 3, depending on which button is selected, then hide the buttons using the show conditional setting in the Layout tab of the properties.  The buttons can all be placed on top of each other to appear is if there is only one button.

 

 

Button 1 has conditional show of if(varWhichButton=3,1,0) Button 2 has conditional show of if(varWhichButton=1,1,0), 3 has if(varWhichButton=2,1,0).

So click on Button 1 which has an action to set varWhichButton to 1

Button 2 will now show

Click on Button 2 which has an action to set varWhichButton to 2 and Button 3 will show etc

If this doesn't give you what you need then please explain why do you want to disable the button? What is it you are trying to do?

Hey, Please don't forget to add kudos, like or mark as a solution if my reply has helped you at all! 🙂

View solution in original post

7 Replies
MarkWillems
Contributor III
Contributor III

Put an action on each button to set a variable as 1, 2 or 3, depending on which button is selected, then hide the buttons using the show conditional setting in the Layout tab of the properties.  The buttons can all be placed on top of each other to appear is if there is only one button.

 

 

Button 1 has conditional show of if(varWhichButton=3,1,0) Button 2 has conditional show of if(varWhichButton=1,1,0), 3 has if(varWhichButton=2,1,0).

So click on Button 1 which has an action to set varWhichButton to 1

Button 2 will now show

Click on Button 2 which has an action to set varWhichButton to 2 and Button 3 will show etc

If this doesn't give you what you need then please explain why do you want to disable the button? What is it you are trying to do?

Hey, Please don't forget to add kudos, like or mark as a solution if my reply has helped you at all! 🙂
iswarya
Partner - Creator
Partner - Creator
Author

Put an action on each button to set a variable as 1 or 0, depending on which button is selected, then hide the button using the show conditional setting in the Layout tab of the properties.

Help me here. What condition should I put under layout tab?

MarkWillems
Contributor III
Contributor III

I've added the if statement to the solution.

 

On the button, right click properties, select Layout,  you will see options under show for Always or Conditional.  Conditional allows you to set a formula which when the result returns a 1, the object will show.

Hey, Please don't forget to add kudos, like or mark as a solution if my reply has helped you at all! 🙂
iswarya
Partner - Creator
Partner - Creator
Author

Should I need to create variable under settings?

MarkWillems
Contributor III
Contributor III

Yes you need to create the variable first

Hey, Please don't forget to add kudos, like or mark as a solution if my reply has helped you at all! 🙂
iswarya
Partner - Creator
Partner - Creator
Author

What values should I mention for the variables created under Settings tab?

MarkWillems
Contributor III
Contributor III

You just need to enter a 1, 2 or a 3, depending on which button you want to see first.

Hey, Please don't forget to add kudos, like or mark as a solution if my reply has helped you at all! 🙂