I need each option to be visual with different color
example: ok - green, bad - red.
Displayed inline as buttons, like that:
so user clicks the color
the problem is that whole questions and answers are as single block, It does not let select answer for each question, canât seem to figure how to solve that,
One thing I would like to add here is instead of creating hex for the colors, you can style the labels as button using the Bootstrap classes btn btn-primary etc. You can play around with the style by directly writing classes in the properties section.
Also, to show an unchecked button, you can bind dynamic class like: dmx-bind:btn-primary="radio.checked" dmx-bind:btn-outline-primary="!radio.checked"
@Atila This is just a rough code. If you are unable to figure it out, just share the code here & Iâll try to modify it for you.
I think there might also be an issue with the way you are binding the questions and answers. With correct repeats and binding, Wappler works flawlessly for such operations.
@Atila reached out to me regarding the grouping of the radio button answers, so Iâm going to post my response here for others.
The desired result is to have a series of questions, each with a series of radio button answers.
In the example below, there is a repeat âquestionsâ and a nested repeat âanswersâ. Iâve simply added a variable in the questions repeat that stores the $index of the repeat. Because radio buttons within a group need the same name attribute, we dmx-bind:name and append the âquestion_indexâ variable we created earlier.
@mebeingken for multiple radio group inside a repeat children (for multi insert on SC, afterwards), if I change the names, how Wappler will receive these data on the server side?
Iâm assuming that in using radio buttons you want to group them using a common name so that only one may be selected at a time. That selected value then is presented to the server side just like any other input.
So then each group will have just one value at any one time.