Hello,
When I run the tests for completion, it says:
Your #dropdown
should have at least two selectable (not disabled) option
elements.
and:
You should have a select
field with an id
of dropdown
.
This is my code for said element, I can’t find the error described, or am I blind?
<select id="dropdown" required>
<option value="choose">Select current role</option>
<option value="student">student</option>
<option value="job">full time job</option>
<option value="learner">full time learner</option>
<option value="not">prefer not to say</option>
<option value="other">other</option>
</select>
Sky020
March 1, 2023, 10:43am
2
Welcome there,
Would you mind sharing all your code and a link to the challenge page?
Welcome to our community!
Two selectable options: change the text with numbers: 1, 2 … for the value attribute.
@Sky020
HTML code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>FCC Survey Form</title>
</head>
<body>
<h1 id="title">FreeCodeCamp survey form</h1>
<p id="description">Thank you for choosing FreeCodeCamp</p>
<p>* required fields</p>
<form id="survey-form">
<!--NAME-->
<fieldset>
<label for="name" id="name-label">* Name: <input id="name" type="text" placeholder="John Doo" required /></label>
</fieldset>
<!--EMAIL-->
<fieldset>
<label for="email" id="email-label">* Email: <input id="email" type="email" placeholder="user@domain.com" required /></label>
</fieldset>
<!--AGE-->
<fieldset>
<label for="number" id="number-label">* Age: <input id="number" type="number" pattern="[0-9]" min="0" max="99" placeholder="23" required />
</label>
</fieldset>
<!--CURRENT ROLE-->
<fieldset>
<label for="dropdown" id="dropdown">* Which option best describes your current role?
<select id="dropdown" required>
<option value="choose">Select current role</option>
<option value="student">student</option>
<option value="job">full time job</option>
<option value="learner">full time learner</option>
<option value="not">prefer not to say</option>
<option value="other">other</option>
</select>
</label>
</fieldset>
<!--FOR HIRE-->
<fieldset>
<label for="radio" id="radio">Are you available for hire?
<input type="radio" id="radio" value="yes" name="radio">yes</input>
<input type="radio" id="radio" value="no" name="radio">no</input>
<br>
<label for="checkbox" id="survey-form">Are you willing to move?<input type="checkbox" id="checkbox" value="yes">yes</input>
<input type="checkbox" id="checkbox" value="no">no</input>
</label>
</fieldset>
<!--DESCRIBE JOB-->
<textarea>Please describe the job you are looking for:</textarea>
<br>
<button type="submit" id="submit">Submit</button>
</body>
</html>
Challenge link:
https://www.freecodecamp.org/learn/2022/responsive-web-design/build-a-survey-form-project/build-a-survey-form
Sky020
March 1, 2023, 3:47pm
5
You have two elements with an id
of dropdown
:
<label for="dropdown" id="dropdown">* Which option best describes your current role?
<select id="dropdown" required>
Hope this helps