How to make button stay "pressed"

When I add conditions for button

“This button is pressed”


background color to change into orange.

–> so it works, but only for a second when I click the button.

I want the button to stay “pressed” in orange color so that customer can make selections on the page.

I’m doing it to give options for customers to pay with credit card/ bank transfer.

‘Button Pressed’ only applies whilst the mouse click is being held down, as you’ve discovered.

If you want a button to change colour after it’s clicked you’ll need to use a custom state and a conditional. Use the button itself to change the value of the custom state.

Yeah like Adam said, you’ll need to use a custom state.

Personally I usually set the custom state on whatever group but button is nested, name is something obvious like “ButtonNameISPressed” and it’s a yes/no option, default no.

When they press the button, it sets the state to Yes and all the conditions change based on the state.

Additionally, if it’s something you anticipate to be triggered on and off then you’ll have to have 2 workflows based on the state, one that Only works IF the state is Yes and the other No and they just do the opposite of each other. That way you can toggle back and forth.

1 Like

I can’t figure out how to make my like button stay “red” (for liking) when I go to another page and I come back to this initial page.

Indeed, when I click on the like button, it is red until I load another page of my website. How could I make this work.

I created a database which lists all likes (user, publication id, date…).

Thanks for your help

If you’re storing your likes in the database, then just add a conditional on the button so that if the current user has liked the particular thing the button represents it will be red.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.