A garden type can only ever have one type and hence in the UI, its represented by radio buttons.
Now all I want is that when a radio button is displayed - next to it, its image as stored in the DB should also be displayed. the Image and Radio button should go hand in hand - in bubble language - should be part of a group. Like this
I cannot use repeating group because if I do so, then each cell will have an image and a radio button ( which expects the full list of options for the radio buttons) whilst what I want is that the user is able to select just one of the choices from the list of Garden types.
May I ask a favour? if you guys are responding - can you send a snapshot of the actual design rather than explain it in words please. Its lot easier to understand that ways.
You should be using a repeating group for this. Each cell in the repeating group will have only one garden type for that cell. So each cell will have only one image and only one radio button.
I really don’t understand what you mean about expects the full list of options for the radio buttons. It sounds like you are confused on what a radio button will be able to refer to. One radio button placed into a repeating group will automatically populate all cells in the repeating group with a radio button. What you need to do is have the data source for the radio button be “current cell’s garden type”; that way the radio button in any given cell will only be associated with the garden type of that particular cell.
Using the set up as described above is exactly what will happen. When a user selects the radio button of a cell representing that garden type as the image and text of radio button indicate, only that garden type is being selected.
If you want to make sure the user only is able to select one garden type, that goes into different aspects of workflows etc.
Thank you Boston, If you try to replicate my problem in bubble editor, you will be able to see from my eyes. what I mean is that in the first cell of the Repeating group - there will be an image of first item of the table Garden type - this will be an allotment and the second element will be a radio button type.
Radio buttons expect a list - always. What list will you feed this Radio button? The entire value of Garden Type ? or the First element of garden Type. Either ways we do this, if we follow the repeating group way, each cell’s repeating group will be checked by default and that’s not what we want. This is what we will end up with
I understand what you’re saying. The Radio Buttons element is itself a list, so putting it inside a repeating group (RG) results in a list within a list.
Perhaps the easiest way to go about it would be to forget both the RG and custom type, and simply use an emoji in the name of the radio button options (assuming, of course, that there’s an emoji which accurately represents what you want to depict).
Alternatively, you can create your own radio button-like mutually exclusive selector widget, which is probably not as hard as it might sound and would provide full control over the look of the UI - i.e. you wouldn’t be stuck with the appearance of native radio buttons.
You’re already on the right track to implement something like this, as you’ve created a custom type to be used in a RG. Here’s an example…
Basically, there’s a custom state on the RG to keep track of the current selection. A single workflow on the icon sets the current selection. That’s really it.
EDIT: Oh, and there’s a conditional on the icon to change its appearance when it’s the currently selected one.
Thanks Shot! I jumped with joy reading the first line of your answer! Somebody understood Thanks again, I dont know why I couldn’t think of this but its perfect solution. Cheers.
Forgot the radio button element requires a list of things as a data source…must have been why I never use it and do as you suggest with the custom buttons.