How to make radio groups and submit directly to database?

How to make radio groups and submit directly to database?

  
Good day everyone. I am creating a survey engine, wherein users can take a survey on a certain issue. I would like to ask for help. I want the user to answer all the questions generated from the database and every answer in a radio group will be stored in some kind of a list and once the user submits the form, the answers are directly inserted in the table "Responses". 

My main problem is that I do not understand how radio buttons work like what I have in Classic ASP. I feel this will be some kind of a complicated SQL statement. Maybe a guide would help me. Thanks! Here's a screenshot of my layout for better understanding. 

Hi,

Have you tried this survey component instead?
You can even check out the code to get some ideas. If I have time I'll create a small eSpace to help you out.

Hope this helps. Let me know if you still need further help. 


Cheers
Hi Ju-Chan,

Radio Buttons work by sharing a Variable. If you were to have a Local Variable called Question1Answer (for example) what you would do is bind each fo the 4 radio buttons, for Question 1, to the same variable. This is done using the properties in the bottom right. For each radio button you would also need to set the Value, when that radio button is selected the value you enter into the properties is stored in the variable.

Outystems is clever enough to know that radio buttons which share a variable belong to the same group so it will only allow one radio button to be selected.

So once you have the radio buttons working it's just a case of storing the variable to the database in whatever way you see fit.

Thanks,
Richard