Hey,
I have a project in which I am trying to add user input to a table. I have managed to get checkbox information into the data table but struggle to make this work for radio buttons. My problem is twofold:
-
for each input a user has given, radio button appear through a repeating panel. However, when I have clicked on a radio button for the first input and then proceed to the second input and click on the respective radio button, the click from the first radio button disappears. I know that I need to make them distinguishable so it is clear that each radio button group belongs to a certain input but could not make it work so far.
-
I have found a way to get the information into the data table at least for one of the radio button groups, that is for one of the inputs. Yet, it does not really convince me because it is rather slow and not entirely flawless.
Please find attached a copy of my project. The respective issues appear on Page3 and its respective ItemTemplate2.
Thanks for your help 
The problem was that all the radio buttons across items had the same group name. I fixed that by changing each to row_{the index of the item}.
2 Likes
That works nicely and solves my 1. question. Thank a lot!
However, the radio button information does not find its way into my data table, yet.
Ah, I missed that part, apologies. Could you clarify what the exact issue is? When I run the code I shared, I see the radio buttons updating each group’s value immediately. Are you seeing something different?
1 Like
You’re absolutely right. It all works fine now! Much appreciated 
1 Like
Actually I have one more question. For the sake of trying out things and making it easier I only have 1 and 2 as values to choose from. However, I actually need 4 values and I am not sure how to incorporate 4 values into the logic that I am using right now. More precisely I have:
def radio_button_1_clicked(self, **event_args):
"""This method is called when this radio button is selected"""
click_row = app_tables.responses.get(email=Globals.mail, output=self.item)
# check_row = check_row['output']
# print(check_row)
if click_row["Innovationssprung"] == 1:
click_row["Innovationssprung"] = 2
else:
click_row["Innovationssprung"] = 1
That is, I would add two more radio buttons but I am not sure in what way I need to change the function for clicking the radio button above.
Thanks a lot for any hints on how to proceed!
You can just keep numerating up to 3 and 4 and check the group_value of the radio button when it’s clicked and then set it to whichever value in the db matches that selected button.
Thanks! Could you provide me with a code example? 
Checkout the documentation for the radio buttons:
You can use the get_group_value method to customize your database updating with however many buttons you end up having.
I tried that, but I am afraid from the documentation it’s not clear to me how exactly I can do it