When a form gets submitted, the data is sent to the server and includes entries for the options selected. Inputs of type radio and checkbox report their values from the value attribute

Tell us what’s happening:

Your code so far

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

<a href="#"><img src="https://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://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>
  <label for="indoor">
<input id="indoor" value="indoor" type="radio" name="indoor-outdoor=indoor">Indoor
<label for="outdoor">
<input id="outdoor" value="outdoor" type="radio" name="indoor-outdoor=on">Outdoor
<label for="indoor"><input id="indoor" type="checkbox" name="fillings" value="loving">loving</label>
<label for="indoor"><input id="indoor" type="checkbox" name="fillings" value="lazy">lazy</label>
<label for="indoor"><input id="indoor" type="checkbox" name="fillings" value="energetic">energetic</label><br>

Your browser information:

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

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

1 Like

Hi @rajjo. The challenge is telling you to give the value attribute to the EXISTING radio and checkbox inputs. But, you created a new set of radio and checkboxes.
Also, please give a clear description of what problem you are facing before posting topics in this forum. That will bring more people to your topic.

ok next time I’ll do.

1 Like