[Solved] When creating a list of radio buttons, how do you make it to where there is only 1 “correct” answer?


Either you solve this with javascript or after submission with php.

You can give your submit button a “onsubmit” and then check the value of your radio button group. If the wrong answer got selected, you show an alert or make a text box visible.

Get Radio Button Value with Javascript

Or you validate the data with php if this is available. But the site has to be submitted first.

solved When creating a list of radio buttons, how do you make it to where there is only 1 “correct” answer?