Survey Form - Build a Survey Form

Tell us what’s happening:

please am i doing wrong with the survey form

!DOCTYPE html>

Survey Form

title

Thank you for taking the time to help us improve the platform

Name: Email: Age(optional):<input id="age" type="number" placeholder="0" Which option best describes your current role? Would you recommend freeCodeCamp to a friend? Definitely Maybe Not sure What is your favorite feature of freeCodeCamp? What would you like to see improved? (chexk all that apply) Front-end Projects Back-end Projects Data Visualization Challenges Open Source Community Gitter help rooms Videos City Meetups Wiki Forum Additional Courses Any comments or suggestions? ineed help to know what am doing wrong **Your code so far**

WARNING

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

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

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

Hello!
It appears most of the basic boiler plate is missing.
< !DOCTYPE html>
is a good start.

Where are the html, header and body?

Happy coding! :slight_smile:

@kemstol To display your code properly here you need to use the triple back tick method. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Survey Form</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1 id="title">Survey Form</h1>
    <p id="description">Thank you for taking the time to help us improve the platform</p>
    <form id="survey-form" action="https://register-demo.freecodecamp.org" method="post>
    <fieldset>
      <label 
      for="name" id="name-label">Name<input id="name" name="name" type="text" placeholder="enter your name" required></label>
      <label 
      for="email" id="email-label">Email<input id="email" name="email" type="email" placeholder="enter your email" required></label>
      <label 
      for="age" id="number-label">Age(optional)<input id="number" name="age" type="number" class="age" placeholder="enter your age" min="3" max="100"></label>
      <label for="current-role">Which option best describes your current role?<select id="dropdown" name="current-role"
        <option value="">Select current role</option>
        <option value="1">Student</option>
        <option value="2">Full Time Job</option>
        <option value="3">Full Time Learner</option>
        <option value="4">Prefer not to say</option>
        <option value="5">Other</option>
        </select>
      </label>
    </fieldset>
    <fieldset>
      <label 
      for="recommend" type="radio">Would you recommend freeCodeCamp to a friend?</label>
      <label for="definitely"><input id="definitely" type="radio" name="definitely" class="inline" value="definitely"/>Definitely</label>
      <label for="maybe"><input id="maybe" type="radio" name="maybe" class="inline" value="maybe"/>Maybe</label>
      <label for="not-sure"><input id="not-sure" type="radio" name="not-sure" class="inline" value="not-sure"/>Not sure</label>
    </fieldset>
    <fieldset>
      <label for="favorite-feature">What is your favorite feature of freeCodeCamp?
        <select id="favorite-feature">
          <option value="">Select an option</option>
          <option value="1">Challenges</option>
          <option value="2">Projects</option>
          <option value="3">Community</option>
          <option value="4">Open Source</option>
        </select>
      </label>
    </fieldset>
    <fieldset>
      <label>What would you like to see improved? (chexk all that apply)</label>
      <label for="front-end-projects"><input id="front-end-projects" name-"front-end-projects" type="checkbox" class="inline" value="checkbox" />Front-end Projects</label>
      <label><input id="back-end-projects" name="back-end-projects" type="checkbox" class="inline" value="checkbox" />Back-end Projects</lavel>
      <label><input id="data-visualization" name="data-visualization" type="checkbox" class="inline" value="checkbox" />Data Visualization</label>
      <label><input id="challenges" name="challenges" type="checkbox" class="inline" value="challenges" />Challenges</label>
      <label><input id="open-source-community" name="open-source-community" type="checkbox" class="inline" value="open-source-community" />Open Source Community</label>
      <label><input id="gitter-help-rooms" name="gitter-help-rooms" type="checkbox" class="inline" value="gitter-help-rooms" />Gitter help rooms</label>
      <label><input id="videos" name="videos" type="checkbox" class="inline" value="video" />Videos</label>
      <label><input id="city-meetips" name="city-meetips" type="checkbox" class="inline" value="city-meetips" />City Meetups</label>
      <label><input id="wiki" namw="wiki" type="checkbox" class="inline" value="wiki" />Wiki</label>
      <label><input id="forum" name="forum" type="checkbox" class="inline" value="forum" />Forum</label>
      <label><input id="additional-courses" name="additional-courses" type="checkbox" class="inline" value"additional-courses" />Additional Courses</label>
    </fieldset>
    <fieldset>
      <label for="suggestions">Any comments or suggestions?
      </label>
      <textarea rows="5rows" cols="60" id="suggestions" name="suggestions" placeholder="Enter your comment here" name="suggestions"></textarea>
    </fieldset>
    <input id="submit" type="submit" value="submit"/>
    </form>
  </body>
</html>

here are the errors i have
1- your #name-label should contain text that describes the input.
2- your #name-label should be a descendant of #survey-form .
3-Every radio button group should have at least 2 radio buttons.
4- All your checkboxes inside #survey-form should have a value attribute and value.

I’m also seeing this error:

“You should have a label element with an id of name-label.”

So the issue here is that you don’t have a label for the name text input.

Radio buttons are part of the same group when they have the same value for the name attribute.

Double check that all of your checkboxes have a value attribute (hint: some of them don’t).

still cant figure it out, tried severally

You need to paste your updated HTML with all of your changes in here (even if they aren’t working) so we can see what you did.

typ<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Survey Form</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1 id="title">Survey Form</h1>
    <p id="description">Thank you for taking the time to help us improve the platform</p>
    <form id="survey-form" action="https://register-demo.freecodecamp.org" method="post>
    <fieldset>
      <label 
      for="name" id="name-label">Name<input id="name" name="name" type="text"  placeholder="enter your name" required></label>
      <label 
      for="email" id="email-label">Email<input id="email" name="email" type="email" placeholder="enter your email" required></label>
      <label 
      for="age" id="number-label">Age(optional)<input id="number" name="age" type="number" class="age" placeholder="enter your age" min="3" max="100"></label>
      <label for="current-role">Which option best describes your current role?<select id="dropdown" name="current-role"
        <option value="">Select current role</option>
        <option value="1">Student</option>
        <option value="2">Full Time Job</option>
        <option value="3">Full Time Learner</option>
        <option value="4">Prefer not to say</option>
        <option value="5">Other</option>
        </select>
      </label>
    </fieldset>
    <fieldset>
      <label 
      for="recommend" type="radio">Would you recommend freeCodeCamp to a friend?</label>
      <label for="definitely"><input id="definitely" type="radio" name="definitely" class="inline" value="definitely"/>Definitely</label>
      <label for="maybe"><input id="maybe" type="radio" name="maybe" class="inline" value="maybe"/>Maybe</label>
      <label for="not-sure"><input id="not-sure" type="radio" name="not-sure" class="inline" value="not-sure"/>Not sure</label>
    </fieldset>
    <fieldset>
      <label for="favorite-feature">What is your favorite feature of freeCodeCamp?
        <select id="favorite-feature">
          <option value="">Select an option</option>
          <option value="1">Challenges</option>
          <option value="2">Projects</option>
          <option value="3">Community</option>
          <option value="4">Open Source</option>
        </select>
      </label>
    </fieldset>
    <fieldset>
      <label>What would you like to see improved? (chexk all that apply)</label>
      <label for="front-end-projects"><input id="front-end-projects" name-"front-end-projects" type="checkbox" class="inline" value="checkbox" />Front-end Projects</label>
      <label><input id="back-end-projects" name="back-end-projects" type="checkbox" class="inline" value="checkbox" />Back-end Projects</lavel>
      <label><input id="data-visualization" name="data-visualization" type="checkbox" class="inline" value="checkbox" />Data Visualization</label>
      <label><input id="challenges" name="challenges" type="checkbox" class="inline" value="challenges" />Challenges</label>
      <label><input id="open-source-community" name="open-source-community" type="checkbox" class="inline" value="open-source-community" />Open Source Community</label>
      <label><input id="gitter-help-rooms" name="gitter-help-rooms" type="checkbox" class="inline" value="gitter-help-rooms" />Gitter help rooms</label>
      <label><input id="videos" name="videos" type="checkbox" class="inline" value="video" />Videos</label>
      <label><input id="city-meetips" name="city-meetips" type="checkbox" class="inline" value="city-meetips" />City Meetups</label>
      <label><input id="wiki" namw="wiki" type="checkbox" class="inline" value="wiki" />Wiki</label>
      <label><input id="forum" name="forum" type="checkbox" class="inline" value="forum" />Forum</label>
      <label><input id="additional-courses" name="additional-courses" type="checkbox" class="inline" value"additional-courses" />Additional Courses</label>
    </fieldset>
    <fieldset>
      <label for="suggestions">Any comments or suggestions?
      </label>
      <textarea rows="5rows" cols="60" id="suggestions" name="suggestions" placeholder="Enter your comment here" name="suggestions"></textarea>
    </fieldset>
    <input id="submit" type="submit" value="submit"/>
    </form>
  </body>
</html>e or paste code here

This element right here is causing you some grief. Do you see why?

really?. didnt see that
do you also advise i use

instead of

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

Radio buttons are considered to be in the same group if they have the same value for the name attribute. Do your radio buttons all have the same value for the name attribute?

If you want to inline code then you need to wrap the code in a single back tick. So I’m going to have to guess what you were asking :slightly_smiling_face:

I’ll give you a hint. You are missing a double quote.

whaooooo! this is interesting

the name -label issues have been fixed with this, thank you soo much

This one is definitely going to cause you some issues. Do you see why?

Hint: Check the tags.

" All your checkboxes inside #survey-form should have a value attribute and value."

Do you see the problem with the value attribute?

One thing that might help you catch some of the issues in future projects is to run your HTML through a validator. That will find a lot of the syntax errors you have in your HTML. Computers are often better at finding these things than we are :slightly_smiling_face:

W3C HTML Validator