Survey Form - Build a Survey Form

I can’t find the issue with it.
it says my #name , #email should require input also and my #dropdown should have at least two selectable (not disabled) option elements.

Your code so far

<!-- file: index.html -->
<!DOCTYPE HTML><link rel="stylesheet" href="styles.css">
<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">Name
  <input id="name" type="text" placeholder="First name">
 Email <input id="email" type="email" placeholder="email address">
 Age(Optional) <input id="number" type="number" min="9" max="120" placeholder="Age"></input>
 <label id="name-label">First name</label>
 <label id="email-label" email>email</label>
 <label id="number-label">number</label>
 Which option best describes your current role?<select id="dropdown">
   <options>
     <options>
 
 <input type="radio" value="Definitely" name="Would you recommend freeCodeCamp to a friend?">Definitely </input>
 <input type="radio" value="Not Sure" name="Would you recommend freeCodeCamp to a friend?">Maybe</input>
 <input type="radio" value="Not Sure" name="Would you recommend freeCodeCamp to a friend?">Not Sure</input>
 Which option best describes your current role?
<input type="checkbox" value="Checked">Student</input>
<input type="checkbox" value="Checked">Full time Job</input>
<input type="checkbox" value="Checked">full time Learner</input>
<input type="checkbox" value="Checked">Prefer not to say</input>
<input type="checkbox" value="Checked">Other</input>
Explain in bio <textarea placeholder="I..."></textarea>
<button id="submit" type="submit" >Submit</button>
</form>
</body>
/* 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/119.0.0.0 Safari/537.36

Challenge Information:

Survey Form - Build a Survey Form

Welcome to the forum
image
You have two opening option tags. Where are the text and closing elements?

2 Likes

Hello @Black16 !

To fix the issue of the # name and the # email, just type only the word required into each input element at end just before the closing bracket. No need to have anything but the word typed there.

The dropdown with the option should appear like the following example:

Example Only

<select id="dropdown">Text for role</select>
<option value="">Text to match value</option>
<option value="">Text to match value</option>"


I hope this helps you to move on in your coding journey.

Happy coding!
2 Likes


I Still don’t get it :pensive: :pensive: :sob: :sob: :sob: :sob:

Here is an example of the required attribute

Example only

<input type="checkbox" name="study" class="learn" id="math" value="math"  required>Math

By placing the required at the end of the input element, the person must check it before the form can be submitted.
Kind of like starting your car before you can drive it.
It must be done.

For the dropdown and option, you already have them in the code. You just need to make the changes to them. Select and option elements require both opening and closing tags < opening>text< /closing> that should state they are select for the select and option for the option. They should not say opening and closing.

I hope this helps you move on!

Happy coding

3 Likes

Thank you soooooooooooo much :sneezing_face: :sneezing_face: :sneezing_face:

1 Like

I also re-did the coding because i noticed there was lots of mistake in the former one some there was no closing tag or even ending the opening tag.

1 Like

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