+ 1

Please guys, the radio input in this code is selecting both options and i want to select only one, what can i do? Thanks

https://code.sololearn.com/WaNg07tjyOQY/?ref=app

12th Dec 2018, 10:32 PM
Faith Daniel
Faith Daniel - avatar
3 Respostas
+ 1
Diego Acero That is precisely the fix. Faith Daniel The radio options need to share the same "name" but can contain their own "values".
13th Dec 2018, 12:14 AM
David Carroll
David Carroll - avatar
+ 1
Don’t know much about HTML but changing the name attribute of lines 24-25 to the same thing seems to be working fine for me. For example: <input type= "radio" name= "gender" value= "male" > Male<br> <input type= "radio" name= "gender" value= "Female"> Female<br><br> https://stackoverflow.com/questions/17055822/why-dont-my-radio-buttons-deselect-when-i-click-on-another-radio-button
12th Dec 2018, 11:50 PM
Diego
Diego - avatar
0
Wow. Thanks
13th Dec 2018, 6:25 AM
Faith Daniel
Faith Daniel - avatar