Hello,
I have a set of buttons in an element, and want to be able to set the color of a button to grey (they are all blue by default), and keep that button grey until another button in that element is pressed. Is that possible?
Thanks
Hello,
I have a set of buttons in an element, and want to be able to set the color of a button to grey (they are all blue by default), and keep that button grey until another button in that element is pressed. Is that possible?
Thanks
Lots of ways to achieve this, depends on what you’re using the buttons for and how they are related (eg all in same group?), but setting a background color condition on each button that triggers by referencing a custom state on the page will work.
You could add a custom state (type=text) to the page called “active_button.” When Button 1 is clicked, add a step to your workflow: Set active_button [or whatever you named the state] of index [or whatever your page element is named] to “Button 1.”
Then set a condition on Button 1: when index’s active_state is “Button 1”—>change background color to grey.
Rinse and repeat for other buttons.
There are more elegant ways depending on your use case, but without knowing more this generic solution should at least achieve what you’re going for.
This topic was automatically closed after 70 days. New replies are no longer allowed.