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:




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

<!DOCTYPE html>

    <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">
      <label id="email-label">Email</label>
      <input id="email" type="email" required placeholder="Email">
      <label id="number-label">Number</label>
      <input id="number" type="number" min="0" max="9" placeholder="0">

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

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 got 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.