Each radio button must have a value attribute

hello there

i’m really stuck at this survey coding challenge can you please tell what am I doing wrong?
this is my code

h1 id="title"> freeCodeCamp Survey Form</h1>

<p id="description"> Thanks for sharing your feed back, please fill the information below: </p>

<form id="survey-form">
<div classe="form-control">
  <label id="name-label" for="name">Name</label> 
   <br>
  <input  type="text" id="name" 
        placeholder="Enter your name"Required
         </div>
    </input>
<br>
<div class="form-control">
  <br>
  

  <label id="email-label" for="email">Email</label>
  <br>
  <input  type="email" id="email"
       placeholder="Enter your email"Required
       </input>
  </div/
  <br>
  <div class="form-control">
    <br>
   <form id="number">
  <label id="number-label" for="number"  >Number</label>
     <br>
  <input type="number" id="number" 
         placeholder="Enter a number"
         min="1" max="70"
         </div>
         </input>
     <div>
       <label name="Timespent" for="dropdown">how many hours did you spend on FreeCodeCamp everyday </label>
       <select id="dropdown">
         <option  value="1hour">1 hour             </option>
         <option 
          value="3hours">3 hours
                 </option>
         <option value="4hours"> 4 hours
                 </option>

       </select>
       </select>
     </select>
     </div>
  <br>
  <br>
     
     <div class="form-control">how did you find Freecodecamp as a begginer
       <br>
      <label for="recommended"><input type="radio" id="recommended" value="beneficial" name="working">Beneficial</label>
       <br>
      <label for="nonbeneficial">
        <input type="radio" id="nonbeneficial"
value="nonbeneficial" name"not working">Nonbeneficial</label>
  </div>
  <br>
  <div class="form-control">
    What would you like to see improved?(Check all that apply)
    <br>
     <input type="checkbox"
           id="name" name="frontend" value="the challenges">
  <label for="the challenges">The challenges.
    <br>
    <input type="checkbox" id="name" name="the sequence" value="the sequence">
    <label for="name">The Sequence of the courses.</label>
    </div>
    <br>
    <div class="form-control">
      <label for="comments">Any additional comments? tell us:</label>
      <br>
      <textarea name="comments" id="comments"></textarea>
    </div>
    <br>
    <button id="submit" type="submit">Submit
    </button>
    </form>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hi @hadeelAlbdairi !

I spot a few html errors.
I would suggest using the html validator
Error in your html will make it harder to pass the tests.

Also make sure to keep the test suite in your html.

  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

When I run the test suite I get this error message
All your radio-buttons need a name attribute : expected 2 to equal 1
AssertionError: All your radio-buttons need a name attribute : expected 2 to equal 1

Do you understand what that means and how to fix that?
Or do you need further clarification?

thanks a lot
can you help me with this challenge i still cannot figure out what am i doing wrong

this is the error i’m getting

Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute. Each radio button must have a value attribute.

i do appreciate more clarification please

You need to read the FULL error message.

This is not the Full error message

When you open up the test suite, you should see this.

That’s the full message.

The part of the message you need to look at is this
All your radio-buttons need a name attribute : expected 2 to equal 1

Here are your radio buttons

and here

The value for the name attribute needs to be the same.
I would change this

to name="working"

thank you so much it worked

1 Like

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