Survey Form - Build a Survey Form - Input and Descendant

Tell us what’s happening:

Everything was going well with the project and I did all of the tasks, except the following ones: " Your #name should require input." and " You should have at least one textarea element that is a descendant of #survey-form ."
However, I did both of these tasks and can’t figure out what is wrong with my code.
Can someone help me? This is what I have so far:

<!-- file: index.html -->
<!DOCTYPE html>
  <head><link rel="stylesheet" href="styles.css"></head>
    <h1 id="title">Survey</h1>
    <p id="description">free survey</p>
    <form id="survey-form">
        <label id="name-label">Name:</label><input type="text" id="name" placeholder="name"></input>
        <label id="email-label">Email:</label><input type="email" required id="email" placeholder="email">
        <label id="number-label">Age:</label><input type="number" min="10" max="120" id="number" placeholder="number">
        <label>Which option best describes your current role?</label>
        <select id="dropdown">
          <option> Student </option>
          <option> Full time job </option>
        <legend>Would you recommend freeCodeCamp to a friend?</legend>
        <input type="radio" name="careers" value="careers">Definetely</input>
        <input type="radio" name="careers" value="careers">Maybe</input>
        <label>What is your favorite feature of freeCodeCamp?</label>
        <input type="checkbox" value="home">Challenges</input>
        <input type="checkbox" value="home">Projects</input>
        <label>Additional comments:</label>
         <input type="textarea"></input>
        <input type="submit" id="submit"></input>


/* 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/ Safari/537.36

Challenge Information:

Survey Form - Build a Survey Form

Your #name has input, but is it required?

You have an input with a type of textarea. Is that the correct way of implementing a text area box?

This article may be of assistance.

Try looking at these couple of things and hopefully it will then pass :slightly_smiling_face:

Yes, If i’m not wrong, it is required

Yes it was wrongly done, thank you so much for your help with the link! It helped me a lot

1 Like

When it says that #name is required, it doesn’t mean you are required to have a #name id. It means that the #name id is a required input for the user of the form.

For example in your code: your email id is set to required but your age isn’t. Try looking at your code and seeing if you can make your #name id a required input for the user.

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