0

Why the radio button is not working?

I don't know if I made an error or what. When clicking in the button "Yes" and "No", why am I able to click both Yes and No. What mistake is there to make able to choose both button. Please help me. I want to make it clickable for just one button. https://sololearn.com/compiler-playground/WYb16fvI6l1q/?ref=app

14th May 2024, 1:15 PM
Mohit Gautam
2 Respostas
+ 1
I don’t think “friend” is a valid parameter of the radio button tag. What do you want to do is set the name parameter of both buttons to “friend” to make them affect the same variable, and then set the value parameter to “want” or “don’t want” for each (right now they are both “want” which wouldn’t work even if the paeameters were correct).
14th May 2024, 1:32 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
+ 1
Same question here. Solution use name attributes. https://www.sololearn.com/Discuss/3276684/?ref=app
14th May 2024, 8:36 PM
Chris Coder
Chris Coder - avatar