Survey Form - Build a Survey Form

Tell us what’s happening:
Describe your issue in detail here.
Its saying that my radio button group needs 2 radio buttons, how should I do this?
Your code so far

<!-- file: index.html -->
<!DOCTYPE HTML>
<html lang="eng"> 
  <head> 
  <title>Happy Application</title> 
  <link rel="stylesheet" href="styles.css">
<meta charset="UTF-8">
</head> 
<body>
<h1 id="title"> Happy application </h1> 
<p id="description"> Apply to be a happy living person </p> 
<form id="survey-form"> 
  <fieldset>
  <label for="name" id="name-label"> Name 
<input placeholder="complete name" id="name" type="text" required> </label> 
<label id="email-label">Email<input type="email" placeholder="email"required id="email"> </input> </label> 
<label id="number-label">Age<input placeholder="age"id="number" type="number" max="99" min="5"> </input> </label> </fieldset> <fieldset>
<p> How are you feeling right now? </p>
<select id="dropdown"> 
  <option > select one </option> 
  <option> Happy </option> 
<option> Sad </option> </select></fieldset>
<fieldset> 
<p> Do you accept to be happy for the rest of your life? </p> <label> 
  <input value="terms" type="checkbox"> I accept </input></label> <label> <input value="terms" type="checkbox">I will think about it</input></label></fieldset> 


<fieldset>
<p> Whats brings you in here? </p> 
<label> <input type="radio" name="brings" value="iafs" name="imsad"> I am feeling sad </input></label>
<label> <input name="feelhappier" value="icfh"required type="radio" name="brings"> I could feel happier </input> </label>  

</fieldset>
<fieldset> 
<p> Tell us why you feel that you need this help: </p> <label> <textarea required type="text"> </textarea> </label>
  <input id="submit" type="submit"> </input> 
  </body> 






   </form>


/* file: styles.css */
/* file: styles.css */
body{width: 100%;background-color: #FFDA33;
margin-top: 2rem;
margin-bottom:2rem; margin-left:2rem; margin-right: 2rem;}

label{ display:block;
margin: 0.5rem}


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

Welcome to our community!

Both ‘input’ elements with the ‘type’ attribute set to the value of “radio” must have the same value for the ‘name’ attribute:

<label> <input type="radio" name="imsad" value="iafs"> I am feeling sad </label>

P.S.

  • the ‘input’ element is self-closing, so it doesn’t need the closing </input> tag
  • your ‘input’ elements have more than one ‘name’ attribute. It is not allowed in the html

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