Survey Form - Build a Survey Form

Tell us what’s happening:
Describe your issue in detail here. hi everyone , i have a problem with my survey form , i have been asked to ensure that each group of radio buttons has at least 2 radio buttons

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Survey Form</title>
    <link rel="stylesheet" href="styles.css">

  </head>
<body>
   <h1 id="title">Survey Form
   </h1>
   <p id="description">please fill in this form carelly
   </p>
   <form id="survey-form">
    <label for="name" id="name-label">
    <input id="name" type="text" placeholder="name" value="" required>
    <label for="email"  id="email-label"  >
    <input id="email" type="email" value="" required placeholder="email">
    <label for="number" id="number-label">
    <input id="number" value="" placeholder="number" type="number" min="0" max="2000">
    <select id="dropdown">
      <option></option>
      <option></option>
     </select>
     <input type="radio" name="text1" value="5">
     <input type="radio" name="text2" value="5">
     <input type="checkbox" value="8">
     <input type="checkbox" value="8">
     <textarea></textarea>
     <button id="submit"></submit>
     </form>
</body>


</html>

/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

As you can see you only have two radio button elements. Add two more radio buttons so that you have four altogether.

Also, please note that to create a radio button group, you assign the same name attribute to each button in the group.

EXAMPLE:

<input type="radio" name="group1" value="a"> A
<input type="radio" name="group1" value="b"> B
<input type="radio" name="group1" value="c"> C
<input type="radio" name="group1" value="d"> D
<input type="radio" name="group1" value="e"> E

This creates a group of five buttons, only one of which can be selected at a time.

1 Like

thank you i solved my problem

1 Like

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