Survey Form - Build a Survey Form

Tell us what’s happening:
I am totally lost as I am not certain what I need to do. I think I have added the items asked for but still get the same results. Should I just start over with the certification project?
Thanks.
I run the code and get " You should have an

input

element with an

id

of

name

.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <link rel="Stylesheet" href="styles.css"/>
  <title>Survey Form</title>
</head>

<body>
  <h1 id="title" id="survey-form">Astronaut Application</h1>
  <p id="description" class="description text-center" >Please fill the form completely.</p>
  <p>Your answers on your application will help determine your status as an applicant to the Terra Space Program.</p>
</body>

<form action="/action_page.php" id="survey-form">
  <fieldset>
    <label for="fname" type="text" id="name-label" id="name">First Name: </label>
    <input type="text"id="fname" name="fname" id="name" required>

    <label for="lname" type="text" id="name-label">Last Name: </label> 
    <input id="lname" name="lname" id="name" required>

    <label for="num-id" type="number" id="number-label">ID Number:(Enter Numbers only) </label>
    <input id="num-id" id ="name"id="number" name="num-id" min="1" max="9">

    <label for="email" name="email" id="email-label" required>e-mail: </label>
    <input id="email" type="email" name="email" id="name"><br>

  </fieldset>
  <br />
  <br />

  <fieldset>
    <h3>Environmental Preferences</h3>

    <p>Please select your home world: </P>
      <label for="Home-wold" id="home-world">Home Planet</label>
      <select name="home-world" id="home-world" id="dropdown">
        <option value="mercury">Mercury</option>
        <option value="venus">Venus</option>
        <option value="earth">Earth</opiton>
        <option value="mars">Mars</option>
        <option value="jupiter">Jupiter</option>
      </select><br />
    <hr color="purple">

     <P>Select your enviromental <strong>state</strong>: </p>
      <label for="sur-state" id="sur-state">Preferred state: </label>
      <select name="sur-state" id="sur-state" id="dropdown">
        <option value="gaseous">Gaseous</option>
        <option value="liquid">Liquid</option>
        <option value="solid">Solid</option>
        <option value="plasma">Plasma</option>
       </select>
       <hr color="purple">

       <p>Physical Exercise Options</p>
       <input type="checkbox" id="exercise1" name="exercise1" value="Intensive"</>
       <label for="exercise1">Intensive</label><br />
       <input type="checkbox" id="exercise2" name="exercise2" value="Exhausting"</>
       <label for="exercise2">Exhausting</label><br />
       <input type="checkbox" id="exercise3" name="exercise3" value="Don't believe in exercise"</>
       <label for="exercise3">Don't Believe in exercise</label><br />
  </fieldset>



<fieldset>
<!--Submit button -->
<label for="about-you">Tell us about yourself!</label>
<textarea id="about-you" name="about-you" rows="4" cols="40">I want to be an astronaut because...</textarea>
    <br />
    <br />
    <input type="submit" value="submit">
</fieldset>

</form>
/* file: styles.css */
h1 {
  text-align: center;
  
}

p {
  text-align: center;
  }

label {
  display: inline-block;
  width: 150px;
  text-align: right;
}

style
input[type=submit] {
background-color: #04AA6D;
text-align: center;
border: none;
padding: 16px 32px;
margin: 4px 2px;

}


Your browser information:

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

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

Remember that id elements should be unique on a page whereas class elements can be reused.

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