Responsive Web Design Projects - Build a Survey Form

Tell us what’s happening:

Hi! I could use a second pair of eyes. My dropdown menu isn’t appearing in the preview, but I went back to step 41 of the registration form for a brush up and it looks like it’s matching in format. The only thing I can think to be wrong is that I write out my code in a word document and then paste it into freeCodeCamp and touch up the details there. I have some eye issues and it makes it easier on them to do it in chunks in word and then move them over to codecamp. Would doing that mess with the code?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html charset="UTF-8">
  <head><link rel="stylesheet" href="styles.css"></head>
  <body>
  <h1 id="title">freeCodeCamp Survey Form</h1>
  <em><p id="description">Thank you for taking the time to help us improve the platform</p></em>  
    <fieldset>
      <label name="name-label" for="name">Name</label>
      <input  name="name" id="name" type="text" placeholder="Enter your name" required>
<label id="email-label" for="email">Email</label>
<input id="email" type="text" placeholder="Enter your Email" required>
<label id="number-label" for="number">Age (optional)</label>
<input min="5" max="120" id="number" type="number" placeholder="Age">

<label for="dropdown">Which option describes your current role?<select id="dropdown"><input name="job"><option value=""Select your current role></option>
<option value="1"Student></option>
<option value="2"Full Time Job></option>
<option value="3"Full Time Learner></option>
<option value="4"Prefer not to say></option>
<option value="5"Other></option></select></label>
    
  </body>
  </html>
/* file: styles.css */
label {
  display: block;
}



Your browser information:

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

Challenge: Responsive Web Design Projects - Build a Survey Form

Link to the challenge:

value=""Select your current role> ← should be in quotes

Thank you for the suggestion! I tried to type it in that way, but the drop down still contains no options.

Ok, Im taking a guess as its been a bit since I did this project and I’m still learning but maybe the label element should close out before the select element? So the select element should not be wrapped inside of the label, it should come after. Could be very wrong here but maybe try that…

Definitely incorrect, my bad!

Why is this input in your select? Its not doing anything

I tried that one too, and even tried it combined with the previous suggestion, but it’s still not working. I might have to pull up the registration form project and use it to retype the code from scratch. If you have any other ideas, let me know! I appreciate your help so far.

I was referencing the registration form to create the dropdown and the instructions said to give all the inputs names, so I did that here, too. I tried to delete it though and it didn’t improve the function of the dropdown. I appreciate the suggestion though, as I don’t really understand the function behind name attributes in the first place.

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