Survey Form - Build a Survey Form

Tell us what’s happening:

Hi, I am in the process of building my survey and am having trouble with 3 things when I run the tests.

  1. Your #dropdown should have at least two selectable (not disabled) option elements
  2. All your radio buttons should have a value attribute and value.
  3. You should have at least one textarea element that is a descendant of #survey-form.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <head>
    <title>Registration Form</title>
  </head>
  <body>
    <h1 id="title">Survey Form</h1>
    <p id="description">Please take a moment to fill out our survey.</p>
 <form id="survey-form">
   <label for="name" id="name-label">Name:</label>
   <input type="text" id="name" name="name" placeholder="Enter your name" required>

   <label for="email" id="email-label">Email:</label> <input type="email" id="email" name="email" placeholder="Enter your email" required>
   <label for="number" id="number-label">Number:</label>
   <input type="number" id="number" name="number" placeholder="Enter a number" min="1" max="100" required>

   <label for"dropdown">Select an option:</label> 
   <select id="dropdown" name="dropdown" required> 
     <option value="option1">Select an option</option> 
     <input type="radio" name="radio" button="2">
     <option value="option2">Option 2</option>
     <input type="radio" name="radio" button="radio">
     <option value="option3">Option 3</option>
     </select>
     <label>Choose one:</label>
     <input type="checkbox" id="checkbox1" name="checkbox1" value="checkbox1">
     <label for="checkbox1">Checkbox 1</label>
     <input type="checkbox" id="checkbox2" name="checkbox2" value="checkbox2">
     <label for"checkbox2">Checkbox 2</label>
     <label for"comments">Additional Comments:</label>
     <form id="textarea">
     <label for="teaxtarea" id ="comments" name="comments" rows="4" cols="50"></textarea>

     <button type="submit" id="submit">Submit</button> 
     <link rel="stylesheet" href="styles.css"> 
    </form>
  </body>
</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15

Challenge Information:

Survey Form - Build a Survey Form

You shouldn’t have the input enclosed in the select element, the select element should equally have a type attribute. your textarea element should have an opening tag and the label tag enclosing it should have closing tag.

  1. The select element does not take input elements as children.

Permitted content: Zero or more <option>, <optgroup> or <hr> elements.

  1. All your type="radio" input elements do not have a value attribute.

  2. You seem to have mix a label and textarea element together.

  3. You should only have one form element and it should contain all the form elements inside it.

Okay, so far I have fixed two out of the three. This is where I am confused.

<label for"dropdown">Select an option:
<select type=“option1” id=“dropdown” name=“dropdown” required

 <label for"dropdown">Select an option:</label> 

This is the instructions for select element:
Inside the form element, you should have a select dropdown element with an id of dropdown and at least two options to choose from.

You didn’t need any other attribute and values to pass it.

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