I have already changed the value attribute in lowercase still not passing the challenge

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<form action="https://www.freecatphotoapp.com/submit-cat-photo">
  <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor">indoor</label>
  <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor">outdoor</label><br>
  <label for="loving"><input id="loving" type="checkbox" name="personality">loving</label>
  <label for="lazy"><input id="lazy" type="checkbox" name="personality">lazy</label>
  <label for="energetic"><input id="energetic" type="checkbox" name="personality">energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  **Your browser information:**

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

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

Read the instructions more carefully.

<label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor">indoor</label>

The white text there is part of the label that the user sees, but how to capture it, so that it is sent with the form?

You want to add an attribute so that the radio button will have a value.

The default value, if not specified, is “on”, but all that means is the radio button has been chosen.

OK great, but is that value useful in any way, in terms of data being sent?

If I say to you, “hey, @antareepd143, it is on”…

What does that mean? What is on? why is it on? what does it being turned on represent? A light switch? a car? It’s ambiguous unless I associate a value which then gives data, which has meaning.

Somewhere in your input element, you have to assign the label text to a value. For forms, inputs always use value as the variable name for the data.

1 Like

You’ve got to add a value attribute with the given text in the challenge panel

1 Like

I could have just said that, but I wanted them to think about “why” this is so, hoping that it will help the to concept stick with them. :smiley:

There’s just getting the right code so they can pass the test, and then there’s understanding why it is the right code.

Which may be obvious to you and I, but we have no way of knowing their level of understanding.

Put value on the checkboxes and radio buttons

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