Hi there, I have created a repeating group in which users are able to click a plus button to add new buttons to the page. I want to allow users to be able to click on one of the repeating group buttons and this will trigger that specific button to change colour. When another button in the repeating group is pressed, this button will now change colour and the previous one will go back to its previous colour. Does anyone have any idea about how to do this?
Please see the image to show you the current layout!
If you only want one button at a time to be ‘selected’ and set a different colour, here’s an easy way…
create a custom state somewhere (on the RG, or on the page etc.) that can be the same ‘type’ as the RG’s content type (or it can just be a number).
When the button is clicked set the custom state value to be the current cell’s data (or current cell’s index if using a number state).
Have a conditional on the button so that when the custom state’s value is the current cell’s data (or index) the button colour is whatever colour you want it to be.