Survey Form - Struggling with User Story #14

Hello Campers,

I’m struggling to pass the last test(16/17 so far), I keep failing on the User Story #14. Below is the portion of my code that relates to this.

           </div>

         <div id="form-group">
            <p>Would you recommend Brazilian Jiu-Jitsu to a friend?</p>
        
            <label for="label1"></label>
            <br>
            <input name="user-recommend" value="Absolutely" type="radio" id="label1" required>Absolutely
            
            <br>   

            <label for="label2"></label>
            <br>
            <input name="user-recommend" value="Perhaps" type="radio" id="label2" required>Perhaps
           
            <br>

            <label for="label3"></label>
            <br>
            <input name="user-recommend" value="No" type="radio" id="label3" required>No
            
            </div>

I’m not sure where I’m going wrong but clearly something is not right.

Please see full code here: https://codepen.io/freeCodeCamp/pen/MJjpwO

Any help would be hugely appreciated. Thanks.

1 Like

Hi efo the link you shared redirects to an empty pen, but i can tell you that the type attribute of your input should be checkbox not radio and also your input should be nested within the label like this :
<label for=“example> <input type=“checkbox” name=“example”> <\label>

Hi Kurogawa,

Thank you so much. It passed, finally. Sorry about the link.

1 Like