Tell us what’s happening:
How can i set the radio tag for “would you recommend freecodecamp to a friend?” to be selected just one, instead of every option?
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>freeCodeCamp Survey Form</title>
<meta charset="usf-8">
<link rel="stylesheet" href="styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="container">
<header class="header">
<h1 id="title" class="title">freeCodeCamp Survey Form</h1>
<p id="description" class="description">Thank you for taking the time to help us improve the platform</p>
</header>
<form id="survey-form">
<div class="form-group">
<label for="name" id="name-label">Name</label>
<input id="name" type="text" placeholder="Enter your name" required>
</div>
<div class="form-group">
<label for="email" id="email-label">Email </label>
<input id="email" type="email" placeholder="Enter your Email" required>
</div>
<div class="form-group">
<label for="number" id="number-label">Age (optional)</label>
<input id="number" type="number" min="13" max="120" placeholder="Age">
</div>
<div class="form-group">
<label for="current-role" id="current-role"> Which option best describes your current role?</label>
<select id="dropdown" name="current-role">
<option disabled selected value>Select current role</option>
<option value="student">Student</option>
<option value="job">Fulltime Job</option>
<option value="lerner">Fulltime Lerner</option>
<option value="No">Prefer not to say</option>
<option value="other">Others</option>
</select>
</div>
<div>
<label id="recommendation">Would you recommend freeCodeCamp to a friend?</label>
</div>
<div>
<label>
<input class="recommendation" type="radio" name="recommendation" value="definitely"> Definitely
</label>
<label>
<input class="recommendation" type="radio" name="recomendation" value="maybe"> Maybe
</label>
<label>
<input class="recommendation" type="radio" name="recommendation" value="notsure"> Not sure
</label>
<label id="feature">What is your favorite feature of freeCodeCamp?</label>
<select class="feature">
<option>Select an option</option>
<option> Challenges</option>
<option>Projects</option>
<option>Communities</option>
<option>Open Sources</option>
</select>
</div>
<label for>What would you like to see improved? (Check all that apply)
<input value="checkbox" type="checkbox"><label> Front-end Projects</label></input>
<input value="checkbox" type="checkbox"><label> Back-end Projects</label></input>
<input value="checkbox" type="checkbox"><label> Data Visualization</label></input>
<input value="checkbox" type="checkbox"><label> Challenges
</label></input>
<input value="checkbox" type="checkbox"><label> Open Source Community</label></input>
<input value="checkbox" type="checkbox"><label> Gitter help rooms</label></input>
<input value="checkbox" type="checkbox"><label> Videos</label></input>
<input value="checkbox" type="checkbox"><label> City Meetups</label></input>
<input value="checkbox" type="checkbox"><label> Wiki</label></input>
<input value="checkbox" type="checkbox"><label> Forum</label></input>
<input value="checkbox" type="checkbox"><label> Additional Courses</label></input>
</label>
<div></div>
<label> Any comments or suggestions?</label>
<input type="textarea" placeholder="Enter your comment here..."></input>
</body>
</html>
/* file: styles.css */
body {
background-color:darkblue;
background-image:url(https://cdn.freecodecamp.org/testable-projects-fcc/images/survey-form-background.jpeg); color:white;
}
.title,.description {
text-align:center;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Challenge: Survey Form - Build a Survey Form
Link to the challenge: