I need help on the "Build a Survey Form"

I do not know what i am doing wrong that makes my code not to pass.
I i have other codes passed but this “Every radio button group should have at least 2 radio buttons” is not working.

Below is my solution that refused to pass. Someone help me out please:

Html


CSS


JavaSCript

Hi @officialsalau, welcome to the forums! Could you please provide your code or a link to the challenge?

<!DOCTYPE html>
<html>
  <head>

  </head>
  <body>
    <h1 id="title">FSF</h1>
    <p id="description">freeCodeCamp Survey Form</p>
    <form id="survey-form">

      <label id="name-label">Name</label>
      <input id="name" type="text" required placeholder="Name">
      <br><br>
      <label id="email-label">Email</label>
      <input id="email" type="email" required placeholder="Email">
      <br><br>
      <label id="number-label">Number</label>
      <input id="number" type="number" min="0" max="9" placeholder="0">
      <br><br>

      <p>What is your favorite car?</p>
      <select id="dropdown">
        <option >Benz</option>
        <option >Rolls Royce</option>
        <option >Toyota</option>
      </select>
      <br>
<p>What is your favourite language?</p>
<input id="htlm" type="radio" value="HTML" name="html-language">
<label for="html">Html</label>
<br>
<input id="css" type="radio" value="CSS" name="css-language">
<label for="css">CSS</label>
<br>
<input id="javascript" type="radio" value="javascript" name="javascript-language">
<label for="javascript">JavaSCript</label>
      <br>
      <p>What developer are you? (Check all that apply)</p>
      <input type="checkbox" value="value">
      <label for="front-end">Front-end</label>
      <br>
      <input type="checkbox" value="value">
      <label for="back-end">Back-end</label>
      <br>
      <input type="checkbox" value="value">
      <label for="Python">Python</label>
      <br><br>
      <textarea rows="4" cols="50" name="comment" form="usrform">
Enter text here...</textarea>
      <br><br>
      <input type="submit" value="Submit" id="submit">
    
    </form>
  </body>
</html>

I am having issues with the radio buttons not passing when i run the code.

The lesson says:

  1. Inside the form element, you can select an option from a group of at least two radio buttons that are grouped using the name attribute

Instead, you assigned the attributes a property of name. name is an attribute itself; you must use it to group the radio buttons.

1 Like

To be honest i still do not get it?

I have figured it out finally. Thank you.

Okay, let me give you an example:
If I told you to give an element a src attribute, you wouldn’t put name="src". Instead, you would put src="www.example.com". In the first example, src is the value of the name attribute. In the second example, src itself is the attribute, and it has a value of www.example.com.
Hope this helps.

I just saw your reply. Glad I could help!

1 Like

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