Cant figure this one out!

Tell us what’s happening:
Describe your issue in detail here.
hey I’m looking for an example of how to set up the value element, kind of lost.

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<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>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="https://www.freecatphotoapp.com/submit-cat-photo">
  <label for="indoor"><input id="indoor" type="radio<value type= indoor>" 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>
</form>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13982.69.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.130 Safari/537.36

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

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

This is messed up. I would recommend using the Reset All Code to get a fresh start.

Then follow the instructions. They give you an example:

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

Do you see the value attribute there? You need to add that to your code in 5 places. Use the value given in the descriptions, but it this case it should match the id - you just need to add the value prop with that string.

1 Like

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