User story N°13 in : Build a survey form

User Story #13: Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute.

i’m not really sure what they mean by "each group should be grouped using the ‘name’ attribute .
this isnt something i can google , i just couldnt understand what they want me to do ?

-this is their code : https://codepen.io/freeCodeCamp/pen/VPaoNP

-and this is mine so far ( no css yet , plain html ) : https://codepen.io/Abdou_dz_23/pen/ROgWQK
-these are the lines of code in question , every label has it’s corresponding input-type-radio idk what’s wrong here

  <label for="radio-button" >While the mainstream media is on the wrong side of PewDiePie's side in this race for 100 Million subs and a literal Billion dollar company who do you think is going to win ?</label>
    <br>
    <input name="likely" id="radio-button" type="radio" >
    <label for="likely">Most likely Pewds</label>
    <br>
    <input name="def" id="radio-button" type="radio">
    <label for="def">Definetly Pewds</label>
    <br>
    <input name="t-series" id="radio-button" type="radio" >
    <label for="t-series">The multi-billion dollar company T-Series ? Duh</label>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36.

Link to the challenge:

What the test is saying isthat each radio button in the same group should have the same name. Additionally, they should not have the same id. Take a closer look at the how the radio buttons in the sample are defined, and you’ll see what I mean.

1 Like

ok SO ! i had to :
1-change their “name” attributes to be the same .
2-add the "value=‘something…’ " attribute to the input tag … (i completely forgot about it)
3-the input tag must be contained inside the label element like this :

<label > <input type="radio" name="a_name" value="a_value">click me </label>

not like this :

<input type="radio" name="a_name" value="a_value"> <label >click me</label>

this fixed the problem and passed the user story thanks for replying !