Survey Form - Build a Survey Form - User Story 13

Tell us what’s happening:

Hello, I’m trying to complete the challenge as it follows, however it seems that I became stuck trying to figure out what I’m missing. I have already searched this forum regarding this very same test but I indeed noticed some inconsistencies on their submission due to the name property having a different value.

This doesn’t seems to be my case though. As you can see the name I used is applied to every radio input instance.

I also tested my form radio behavior clicking each of them and them seemed to be working as intended: only one is selected each time.

Finally, I also tried removing their ids to see if something would change, but I got the same result.

Can someone please tell me what I’m doing wrong?

The test in question

Every radio button group should have at least 2 radio buttons.

My code so far (omitted for emphasis)

        <p>Would you recommend freeCodeCamp to a friend?</p>
        <label for="recommendation-definetly">
          <input type="radio" name="recommendation" id="recommendation-definetly" value="3" checked />Definitely 
        <label for="recommendation-maybe">
          <input type="radio" name="recommendation" id="recommendation-maybe" value="2" />Maybe 
        <label for="recommendation-notsure">
          <input type="radio" name="recommendation" id="recommendation-notsure" value="1" />Not sure

My browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.1 Safari/605.1.15

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

Wow, ok. Nevermind, I already figured it out.

Here’s what happened: it seems that this rule is applied globally, which means if you ever add a single radio by mistake, that would cause the test to fail because it requires at least two. Even though you already had a fulfilled that criteria before (like the fields I reported).

It’s a stupid mistake, the rule clearly mentions Every. But since I’m using the exercise model as guide and it only got a single group of radios. It kind of lured me into thinking that this test would be applied only once.

So basically, what happened was that my other fields had a list of checkboxes, however I didn’t notice that there was one radio input there, which I assume I forgot to change the type to checkbox because of copy-pasting from the fieldset with radios.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.