Survey Form - Build a Survey Form

So, it’s telling me that “Every radio button group should have at least 2 radio buttons.” What does that mean?

  **My code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="styles.css">
  <title>freeCodeCamp Survey Form</title>
</head>
<body>
  <h1 id="title">freeCodeCamp Survey Form</h1>
  <p id="description">Thank you for taking the time to help us improve the platform</p>
  <form id="survey-form">
    <input id="name" type="text" placeholder="Enter your name" required><label id="name-label">Name</label></input>
    <input id="email" type="email" placeholder="Enter your Email" required><label id="email-label">Email</label></input>
    <input id="number" type="number" min="18" max="120" placeholder="Age"><label id="number-label">Age</label></input>
    <select id="dropdown">
      <option>Student</option>
      <option>Full time job</option>
    </select>
    <input id="radio" type="radio" value="yes" name="yes"><label for="yes">Yes</label></input>
    <input id="radio" type="radio" value="no" name="no"><label for="no">No</label></input>
  </form>
</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/103.0.5060.134 Safari/537.36 Edg/103.0.1264.77

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

So, here’s an update to my code so far.

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="styles.css">
    <title>freeCodeCamp Survey Form</title>
  </head>
  <body>
    <h1 id="title">freeCodeCamp Survey Form</h1>
    <p id="description">Thank you for taking the time to help us improve the platform</p>
    <form id="survey-form">
      <input id="name" type="text" placeholder="Enter your name" required><label id="name-label">Name</label></input>
      <input id="email" type="email" placeholder="Enter your Email" required><label id="email-label">Email</label></input>
      <input id="number" type="number" min="18" max="120" placeholder="Age"><label id="number-label">Age</label></input>
      <select id="dropdown">
        <option>Student</option>
        <option>Full time job</option>
      </select>
      <input id="radio" type="radio" value="yes" name="yes"><label for="yes">Yes</label></input>
      <input id="radio" type="radio" value="no" name="no"><label for="no">No</label></input>
      <input type="checkbox" value="nice"></input>
      <input type="checkbox" value="mean"></input>
      <textarea></textarea>
      <input id="submit" type="submit"></input>
    </form>
  </body>
</html>

Is there anything wrong?

Radio buttons are part of the same group if they have the same name attribute.

Ah, ok. Thanks for letting me know.

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