Survey Form - Build a Survey Form

Tell us what’s happening:

I cant seem to get radio button names, or get them grouped together. I am also struggling with getting checkbox values to be accepted. I have tried changing names and values. What am I missing?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

Your browser information:

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

Challenge Information:

Survey Form - Build a Survey Form

Hey there,

Please update the message to include your code. The code was too long to be automatically inserted by the help button.

When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

@ilenia my apologies. I didn’t realize the code was not attached.

 <div class="form-group">
        </fieldset>
        </div>
          <div class="form-group">
        <fieldset>
          <legend>Favorite part of conducting surveys</legend>
           <label for="favorite">people<input id="favorite" type="checkbox" name="fav[1]" value="1"></label>
           <label for="favorite" >places<input id="favorite" type="checkbox" name="fav[2]" value="2" checked></label>
           <label for="favorite" >things<input id="favorite" type="checkbox" name="fav[3]" value="3"></label>
           <label for="favorite" >events<input id="favorite" type="checkbox" name="fav[4]" value="4"></label>
         </fieldset>
         </div>
         <div>
            <fieldset id="group1">
        <div class="form-group">
         <legend>How satisfied are you with your surveys? (required)</legend>
           <input id="1" type="radio" value="1" name="group1">
           <label for="1" value="1" name="group1">1</label>
           <input id="1" type="radio" value="1" name="group1">
           <label for="1" value="1" name="group1">2</label>
           <input id="1" type="radio" value="1">
           <label for="1" value="1" name="group1">3</label>
           <input id="1" type="radio" value="1" name="group1">
           <label for="1" value="1" name="group1">4</label>
            <input id="1" type="radio" value="1" name="group1">
            <label for="1" value="1" name="group1">5</label>
            </fieldset>

You have options 1-5 for your checkbox, but you give each one a value of 1 so no matter what they select the value is always going to be one. Can you explain exactly why you mean by getting the checkboxes accepted

You also have multiple input elements with the same id, that is invalid html. There can not be multiple elements with the same id. You can have multiple elements with the same class, but not id

You also are trying to give labels a value. Labels do not have a value attribute so that cant be there

Take your html and run it through the validator and fix those issues because there are a good bit of issues

For the checkboxes, I keep receiving this error when I test the code. ‘All your checkboxes inside #survey-form should have a value attribute and value.’

I appreciate the highlighting of all my issues. I am working on them, and making the code look better. I was just trying to ensure that I completed all of the requirements prior to attempting to clean everything up.

Hi there!
id attribute value should be unique for each element within HTML code.

Also the for attribute value should be matched with the id attribute value.

You have missing select element and it’s options