Survey Form - Build a Survey Form

Tell us what’s happening:
I am having issue on how to make each radio button clickable one at a time

   **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html></html>
<h1 id="title">FreeCodeCamp Survey Form</h1>
<p id="description">Below is a survey form that would enable users input their details.</p>
<form id="survey-form"> 
 <label>Enter Your Name: <input type="text" id="name" required placeholder="Enter Your Name" /></label>
 <label>Enter Your Email: <input id="email" type="email" pattern="/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" required placeholder="Enter Your Email" /></label> 
 <label>Enter Your Number: <input id="number" type="number" min = 4  max = 15 required placeholder="Enter Your Number"/></label>
    <label> <input id="name-label name" required/>Input Name </label>
    <label><input id="email-label email" required />Input Email</label>
    <label> <input id="number-label number" required />Input Number</label>
 <select id="dropdown">
   <option>Choose your gender</option>
    <option>male</option>
     <option>female</option>
     <option>other</option>
 </select>
 <fieldset>
<div><label> <input type="radio" value="information" name="career">Are you a student</label></div>

 <div><label><input type="radio" value="information" name="access">Do you have access to free internet</label></div>
 
 <div><label>
   <input type="radio" value="information" name="hobbies">Do you play video games</label></div>

 <div><label><input type="radio" value="information" name="favourites">Are you a chess lover</label></div>
</fieldset>

<fieldset><div><label><input type="checkbox" value="personality">I love to be around people</label></div>
 <label><input type="checkbox" value="personality">I love eat pizza</label>
<div><label><input type="checkbox" value="personality">I know how to drive a car</label></div>
 <label><input type="checkbox" value="personality">I have a cat</label></fieldset>























</form>
/* file: styles.css */

   **Your browser information:**

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

The questions you are asking for the radio buttons don’t seem like they should actually go with radio buttons. Each of these questions seems independent of the other and should probably be check boxes instead.

But to answer your question, if you want the user to only be able to check one of the radio buttons at a time then they all need to have the same name attribute.

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