Using buttons as service options

Hello -

I have created two tile services options [Small Truck & Large Truck]. I would a using to click on one tile and it presents the appropriate cost conditionally (I’m good here already). Were I’m stuck is I want to prevent the user from clicking both at the same time.

Scenario
I want the user to be able to click on one or the other but not both at the same time. I have it set conditionally when the user clicks on one, it changes the color for that one .

Can you use the conditional to make the second button Not Clickable = true

I’d set a state on the container of these elements called “truckType” and then change the state based on which button is pressed. To change the color on the button, would look like “when Group X’s truckType is “one” background color is x.”

2 Likes

Thanks for the prompt reply. I may be over complicating it in my head. But, I was going to go that route but what happens if they want to toggle between the two?

For instance, maybe they click on the small truck or they may be just shopping to check between the two options. I would still want them to be able to click back to the other option. Make sense?

By using @csblack technique, you can get what you’re looking for. Have the buttons toggle the state on the group, and have the total be calculated depending on the state of the group. That’s how I’d approach it

1 Like

Thanks @csblack I’m not as concerned about the colors as I am the ability for the user to toggle back and forth with the restriction of only click one at a time.

Here is what I would like to happen -

When the user clicks on the small truck tile 1 - it changes the color of that tile to highlight that it’s been clicked 2 - I would like the appropriate base rate to be updated in the cost field 3 - there is a small question mark beside the cost file a user can click to get a description of what’s included in the base rate for the small truck.

This would also apply when the user clicks the large truck. I have already accomplished this using the Radio Buttons. But the tile option looks more appealing to the user, unfortunately more complicated.

All of that is possible with custom states. Give it a try, and if you’re still struggling, post a link to your app and I’ll show you how to do it.

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