Survey Form - Build a Survey Form

Tell us what’s happening:
Hello, I’m having trouble finishing my project. Can someone explain what I need to do to solve:

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

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
    <link rel="stylesheet" href="styles.css">
</head>
<body>
  <h1 
  id="title">
  Pet Preference
  </h1>
  <p id="description" value="description">Do you own a pet? 
    </p>
  <form method="post" action='https://register-demo.freecodecamp.org' id="survey-form" value="survey-form">
          <input type="checkbox" id="yes" name="choice" value="yes" />
      <label for="contactChoice1">Yes </label>

      <input type="checkbox" id="no" name="choice" value="no" />
  <label for="contactChoice2">No </label>
   <hr/><label for="name-label"  id="name-label">*Enter Your Pet's Name: <input id="name-label"  name="name-label" type="text" required placeholder="If more than one, please separate with a comma"/></label>
        <label for="number">*Enter the number of Pet(s) owned: </em><input id="number" name="number" type="number" required placeholder="5" min="1" max="100"/></label>     <label for="number-label" id="number-label">How many Co-Parents? <input id="number-label" name="number-label" type="number" placeholder="Jane Smith"/></label>
                   <label for="email-label" id="email-label">Enter Your Co-Parent's E-mail Address: <input id="email-label" name="email-label" type="email" /></label>
  <fieldset>
    <hr/>
    <label for="name">*Enter Your Full Name: (First and Last Name)<input id="name" name="name" type="text" required/ placeholder="John Smith"></label>
     <label for="email">*Enter Your E-mail Address: <input id="email" name="email" type="email" required placeholder="Ilovedogs@freeCodeCamp.org"/>
      <label for="password">*Enter Your Password: <input id="password" name="password" type="text" required/>
  </fieldset>
      <fieldset>
        <legend>Please select the type of Pet you have: </legend><div>
        <label for="mammals"><input id="mammals" type="radio" name="pet" value="mammals" class="inline" /> Mammals</label>
        <label for="reptiles"><input id="reptiles" type="radio" name="pet" class="inline" value="reptiles"/> Reptiles</label>
        <label for="birds"><input id="birds" type="radio" name="pet" class="inline" value="birds"/> Avian</label>
        <label for="inanimate"><input id="inanimate" type="radio" name="pet" class="inline" value="inanimate"/> Inanimate Object</label>
        <label for="terms-and-conditions" name="terms-and-conditions">
          <input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
        </label>
      </fieldset>
      <fieldset>
        <label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label>
        <label for="age">Input your Pet's Age (years): <input id="age" type="number" name="age" min="13" max="120" /></label>
        <label for="species">Input your Pet's species (dog, cat, parrot, rock, etc): <input id="species" type="number" name="species" min="13" max="120" /></label>
        <label for="breed">Input your Pet's Breed: <input id="age" type="number" name="age" min="13" max="120" /></label>
        <label for="dropdown">How did you hear about us?
          <select id="dropdown" name="dropdown">
            <option value="">(select one)</option>
            <option value="1">freeCodeCamp News</option>
            <option value="2">freeCodeCamp YouTube Channel</option>
            <option value="3">freeCodeCamp Forum</option>
            <option value="4">freeCodeCamp Pet Club</option>
            <option value="5">Other</option>
          </select>
        </label>
        <label for="bio">Provide a bio:
          <textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
        </label>
      </fieldset>
      <input type="submit" value="submit" id="submit"/>
    </form>
  </body>
</html>
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;
  font-family: Tahoma;
  font-size: 16px;
}

h1, p {
  margin: 1em auto;
  text-align: center;
}

form {
  width: 60vw;
  max-width: 500px;
  min-width: 300px;
  margin: 0 auto;
padding-bottom: 2em;

}

fieldset {
  border: none;
  padding: 2rem 0;
  border-bottom: 3px solid #3b3b4f;
}

fieldset:last-of-type {
  border-bottom: none;
}

label {
  display: block;
  margin: 0.5rem 0;
}

input,
textarea,
select {
  margin: 10px 0 0 0;
  width: 100%;
  min-height: 2em;
}

input, textarea {
  background-color: #0a0a23;
  border: 1px solid #0a0a23;
  color: #ffffff;
}

.inline {
  width: unset;
  margin: 0 0.5em 0 0;
  vertical-align: middle;
}

input[type="submit"] {
  display: block;
  width: 60%;
  margin: 1em auto;
  height: 2em;
  font-size: 1.1rem;
  background-color: #3b3b4f;
  border-color: white;
  min-width: 300px;
}

input[type="file"] {
  padding: 1px 2px;
}

Your browser information:

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

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

this checkbox should also have a value attribute

1 Like