Forum Academy Marketplace Showcase Pricing Features

Help with RGroups that works like radio buttons

Hey guys, I hope you are fine.

I’m looking for a solution for a lot of weeks by now. I’m building an app that will work like iFood App, in other words, many restaurants, each restaurant with its products, each product with its options, each option with its unique variation.

I took a picture of the actual layout of one restaurant page with a modal pop-up that displays a product options with its variations:

I did this list of options with variations using repeating groups of variations inside a repeating group of options, and created a custom state of the selected thing based on the current cells index.

When a variation is clicked, it changes the icon to “selected”, and I called the :plus item to create a custom state with the list of selected variations.

THE PROBLEM IS: when the user selects another variation in the same option, it behaves like a radio button correctly, showing the deselected icon, but I could not find a way to :minus the previously selected item before it :plus item the next.

Rather than removing the previously selected item, you could reset the state for that option, and then :plus the new item. If this doesn’t work for your use case, feel free to reach out to Bubble Support with your app name and use case for additional suggestions!

Hey Rachel! Thank you for the help.

The problem is that if I reset the state it will lose others RGroup variations that has been selected in another RGroup options. I need them to keep selected and only removes or reset that specific RGroup variation of that RGroup Option.

Is there another way to do this that I’m not realizing?

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