Stuck on Survey Form

Hey :slightly_smiling_face:
I have been working on my survey form for the last 2 days but even though I have radio buttons and checkboxes #13 and #14 do not seem to pass the test… I have rebuild it from scratch again and compared it to other solutions but cannot find the error why :frowning:

Maybe one of you can help?

Here is what it looks like right now: https://codepen.io/JassyGold/full/KKVroPy

Challenge: Build a Survey Form

Link to the challenge:

The elements in your radio-group don’t need an id, but all the elements need the same name attribute otherwise the browser cannot identify them as a group.
The elements in a checkbox group don’t need an id, but they need to have the same name.
The for attribute of label is useless when used with a radio or checkbox group.
Hope this solves your problem or at least helps you getting closer to the solution.

Addendum: I also just finished my survey form today, it might help you with your radiobuttons and checkboxes: Survey form

1 Like

I think maybe take another look at the name attribute. You shouldn’t be able to select all radio buttons at the same time. If one radio button is checked and you check a different radio button in the same group, the old radio button should become unchecked.

Thanks :slight_smile: The name part did the trick.
Also your survey looks amazing - Great job!!

Yeah I saw that and could figure out why it did that but I changed the “for” attribute and it’s fixed now too :smiley: