Survey Form - Build a Survey Form

I got stuck on last three checks say like:

  • Failed:You should have an input or button element with an id of submit.

  • Failed:Your #submit should have a type of submit.

  • Failed:Your #submit should be a descendant of #survey-form.

What to correct here?

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en"
<head>
  <meta charset="UTF-8">
  <meta http-equip="X-UA-Compatible"content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Survey Form Project 1 Freecodecamp</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
  <h1 id="title">Survey Form</title>
  <p id="description">Fill the form below to register to coding camp.</p>
  <fieldset>
    <form id="survey-form">
      <label id="name-label">Enter your name</label>
      <input type="text" id="name" required placeholder="Enter your name">
      <label  id="email-label">Enter your email</label>
      <input type="email" id="email" required placeholder="Enter your email">
      <label id="number-label">Age</label>
      <input type="number" id="number" min="13" max="50" placeholder="Age">
      <label for="dropdown">Which language you can code with today?</label>
      <select>
        <option>Select the language</option>
        <option>HTML</option>
        <option>CSS</option>
        <option>Javacript</option>
        <option>C</option>
      </select>
      <h3>How likely are yo to recommend our school to your friend?</h3>
      <label for="definitely">Very likely</label>
      <input type="radio" id="definitely" name="recommend" value="verylikely">
      <label for="maybe">Somewhat likely</label>
      <input type="radio" id="maybe" name="recommend" value="somewhatlikely">
      <label for="notsure">Not likely</label>
      <input type="radio" id="notsure" name="recommend" value="notsure">
      <label for="dropdown">What is your favorite feature?</label>
        <select id="dropdown">
          <option>Select your favorite feature</option>
          <option>Challenges</option>
          <option>Projects</option>
          <option>Resources</option>
          <option>Community</option>
        </select>
      <h3>What would you like to see improved?</h3>
      <label><input type="checkbox" name="" value="projects"></label>
      <label><input type="checkbox" name="" value="challenges"></label>
      <label><input type="checkbox" name="videos" value="videos"></label>
      <label><input type="checkbox" name="resources" value="resources"></label>
      <label><input type="checkbox" name="morecourses" value="morecources"></label>

      <textarea>
      <input type="submit" id="submit">
    </form>
  </fieldset>
</body>
</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/112.0.0.0 Safari/537.36

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

Welcome to our community!

  • the element shown above is not closed
  • the ‘textarea’ element hasn’t got the closing tag
  • the h1 element is not closed

Thank you mate.

I corrected what you correct me.
But I got stuck on last three checks say like:

  • Failed:You should have an input or button element with an id of submit.
  • Failed:Your #submit should have a type of submit.
  • Failed:Your #submit should be a descendant of #survey-form.

Please help.

Your ‘submit’ input is not being recognised because you have a textarea element directly above it which has no closing tag (as it’s not a self-closing element). If you look at the preview of your form, you’ll see that the ‘submit’ input (and other code) is inside the textarea.
Add a closing tag to the textarea and all of the tests will pass.

@erimnony Always post a new code if you experienced an issue again, after getting instruction from the members of the forum.

Thank you @igorgetmeabrain
Resolved

Thank @DobarBREND it’s resolved

1 Like

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