Survey Form - Build a Survey Form

Hi I Keep getting the error Every radio button group should have at least 2 radio buttons. I pretty sure every radio grp does have 2 radio buttons not sure what im missing.

<doctype html>
  <html en="lang">
<head>
  <title>Favorite anime Survey</title>
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <meta charset="UTF-8">
  <link rel="styleshee" href="styles.css"></link>
</head>
<body>
  
  <h1 id="title">Anime Survey</h1>
  <form id="survey-form">
    <div>
    <p id="description"class="ftm">2. <span>Favorite Transformation</span></p>
    </div>
     <div>
    <p id="description"class="ftv">3. <span>Favorite Villian</span></p>
    </div>
  <div class="survey">
    <div class="hero">
      
    </div>
    
    <p class="fmh">1. <span>Favorite Main Hero<span></p>
    
  </div>
  <h1>Personal</h1>
   </fieldset>
  <fieldset class="personal">
    <label id="name-label">
  <input required placeholder="name" id="name"type="text">Name</input>
  </label>
  <label id="email-label">
  <input placeholder="email" required id="email" type="email">Email</input>
  </label>
  <label id="number-label">
  <input placeholder="number"min="20"  max="10000000000"id="number" type="number">Number</input>
  </label>
  </fieldset>
  <fieldset class="field">
    <label>
    <div class="qst2">

    </div>
   <label for="anime">
  <input name="mdl" value="mkdl" id="name" class="mh" type="radio">Monkey D luffy</input>
  
  </label>
  <label id="goku"for="goku">
  <input value="goku" name="goku"class="mh" type="radio">Goku</input>
  </label>
  <label for="ichigo">
    <input value="ichigo" id="ichigo"name="ichigo"class="ichigo"  type="radio">Ichigo</input>
  </label>
  <label id="satima"for="satima">
    <input value="satima" class="Satima" type="radio" name="Saitama">Saitama</input>
  </label>
  </label>
  </fieldset>
  <fieldset class="favt">
    <label>
  <input value="gokku" for="gokku" Id="gokku"name="goku"type="radio">Goku</input>
  <input id="mkdl" value="mkdll" for="mkdl" name="mdl" type="radio">Monkey D Luffy</input>
  <input value="mkdl" for="icchigo"id="icchigo" name="ichigo" type="radio">Ichigo</input>
  <input value="mkdl" id="naruto" for="naruto"name="naruto" type="radio">Naruto</input>
  </label>
  </fieldset>
   </fieldset>
  <fieldset class="favt">
    <label>
  <input value="mkdl" id="frieza"for="frieza"name="firea" type="radio">Frieza</input>
  <input value="mkdl" id="blackb"
  for="blackb"  name="blackb" type="radio">Black Beard</input>
  <input value="mkdl"  for="Yhwach" id="Yhwach" name="ywah" type="radio">Yhwach</input>
  <input value="mkdl"  id="Madara"for="Madara" name="madara" type="radio">Madara</input>
  </label>
  </fieldset>
   <label for="referrer">How did you hear about us?
          <select id="dropdown" name="referrer">
            <option value="">(select one)</option>
            <option value="1">friend</option>
            <option value="2">School</option>
            <option value="3">Online</option>
            <option value="4">Other</option>
          </select>
        </label>
        
        <textarea></textarea>
        <h2>Do you like surveys?<h2
        <fieldset class="answers">
  <label for="yes">
          
<input value="yes"id="yes"class="yes"type="checkbox">yes</input>
    </label>
    <label for="no">
    <input value="no" id="no"  type="checkbox"> no</input>
        </label>
        </fieldset>
        <button type="submit" id="submit">Submit</button>
  </form>
</body>



  </html>

Radio buttons are considered to be in the same group when they have the same value for the name attribute.

Bonus help:

The id attribute goes on the input in this case. The for attribute on the label needs to point to the id on the input.

1 Like

Thanks for the help I made sure all the for aligned correctly with my id’s and made sure the names matched the value’s but im still getting the same error Every radio button group should have at least 2 radio buttons…

 </div>
   <label for="name">
  <input name="mdl" value="mdl" id="name" class="mh" type="radio">Monkey D luffy</input>
  
  </label>
  <label for="goku">
  <input id="goku" value="goku" name="goku"class="mh" type="radio">Goku</input>
  </label>
  <label for="ichigo">
    <input value="ichigo" id="ichigo"name="ichigo"class="ichigo"  type="radio">Ichigo</input>
  </label>
  <label for="satima">
    <input  id="satima" value="Saitama" class="Satima" type="radio" name="Saitama">Saitama</input>
  </label>
  </label>
  </fieldset>
  <fieldset class="favt">
<label>
    <label for="gokku"> 
<input value="goku"  Id="gokku"name="goku"type="radio">Goku
  </input>
  </label>
<label for="mkdl">
  <input id="mkdl" value="mdl" name="mdl" type="radio">Monkey D Luffy</input>
  </label>
  <label for="icchigo">
  <input value="ichigo" "id="icchigo" name="ichigo" type="radio">Ichigo</input>
  </label>
  <label for="naruto">
  <input value="naruto" id="naruto"  name="naruto" type="radio">Naruto</input>
  </label>
  </label>
  </fieldset>
   </fieldset>
  <fieldset class="favt">
    <label>
    <label for="frieza">
  <input value="firea" id="frieza"name="firea" type="radio">Frieza</input>
  </label>
  <label for="blackb">
  <input value="blackb" id="blackb"
    name="blackb" type="radio">Black Beard</input>
  </label>
  <label for="Yhwach">
  <input value="ywah"  id="Yhwach" name="ywah" type="radio">Yhwach</input>
  </label>
  <label for="Madara">
  <input value="madara"  id="Madara" name="madara" type="radio">Madara</input>
  </label>
  </label>
  </fieldset>
  

You don’t want the names to match the values. The value attribute should be different for each radio button input. But if you want the radio buttons to be in the same group then they all must have the same name attribute.

Thank you!!! Thank You!!!

1 Like

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