Survey Form - Build a Survey Form

Tell us what’s happening:
Describe your issue in detail here.
In the item that says: All your radio buttons should have a value attribute and value. I’m not quite understanding what I’m doing wrong, since I use value and its respective attributes for the options inputs. and it throws me the same error
Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
 <head> 
    <meta charset="UTF-8">
    <title><h1>survey-form.freecodecamp.rocks</h1></title>
      <link rel="stylesheet" href="style.css" />
 </head>
  <boyd>
   <h1 id="title">freeCodeCamp Survey Form</h1>
   <p id="description">Thank you for taking the time to help us improve the platform</p>

    <form id="survey-form" "action='https://survey-form.freecodecamp.rocks'>
    
    <fieldset>

      <label id="name-label" for="name">Name<input id="name" type="text" placeholder="Enter your name" required /></label>
<label for="email" id="email-label">Email<input id="email" type="email" placeholder="Enter yor email" required /></label>
<label for="number" id="number-label">Age(optional)<input id="number" type="number" min="13" max="100" placeholder="Age" required /></label>

<p><label>What is your favorite feature of freeCodeCamp?

<select id="dropdown" name="dropdown"> 
  <option value="">Select current role</option>
  <option value="1">Student</option>
  <option value="2">Full Time Job</option>
  <option value="3">Full Time Learner</option>
  <option value="4">Prefer not to say</option>
  <option value="5">Other</option>
</select>
</label>
</p>

<p><label>Would you recommend freeCodeCamp to a friend?</label></p>
<p><label>Would you recommend freeCodeCamp to a friend?</label></p>
<label for="definitely"><input name="recommend" class="inline" type="radio" value="" />Definitely</label>
<label for="maybe"><input name="recommend" class="inline" type="radio" value="1" />Maybe</label>
<label for="not-sure"><input name="recommend" class="inline" type="radio" value="2" />Not sure</label>

<p><label>What is your favorite feature of freeCodeCamp?
</label></p>


<p><label>What would you like to see improved? (Check all that apply)</label></p>

<input type="checkbox" name="options" class="inline" value="options"/> 
<input type="checkbox" name="options" class="inline" value="options"/>
<input type="checkbox" name="options" class="inline" value="options"/>
<input type="checkbox" name="options" class="inline" value="options/>
<input type="checkbox" name="options" class="inline" value="options"/>
<input type="checkbox" name="options" class="inline" value="options"/>
<input type="checkbox" name="options" class="inline" value="options"/>


<label for="comment">Any comments or suggestions?
<textarea cols="50" rows="5" id="comment" name="comment" placeholder="Enter your comment here...">
  </textarea>
 </label>
     <button type="submit" id="submit" />Submit</button>
 
      </fieldset>
   
    </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/106.0.0.0 Safari/537.36 Edg/106.0.1370.52

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

One of your radio buttons is missing a value for the value attribute.

On another note, you gave the same value (“options”) for all the value attributes of your check boxes. Those should be unique.

2 Likes

In the first radio button, you left the value blank. Since ‘definitely’ is a selectable option, you must have a value for it. Otherwise, when you are using forms to collect information, that radio button may not save any information.

Also, did you mean to ask “Would you recommend freeCodeCamp to a friend?” twice in your form? If not, you may want to delete one of the identical lines.

Ready, there I was able to pass, it was that of putting a single value for the radio, and different values ​​for the checkbox

1 Like