Value attribute with ckeckboxes

Hello, I want to have a help about some lines of code:


<label><input type="checkbox" name="personality" value="energetic"> energetic</label>.

when I run it this message appear: " One of your checkboxes should have the value attribute of energetic." I dont know that appendedPreformatted text`

I don’t get any errors withe that line of code. Could you give more context (surrounding code)? Also, if you are working on a challenge, could you post a link to it so we know what you are trying to accomplish (or explain what you are trying to do)? Finally, you might want to edit the formatting of your error, it’s hard to read.

OK themagicbean! Thank you very much for your availability to respond to my concerns. I am working on a challenge and this concerns the use of the ‘value’ attribute with radio buttons and check boxes
I then give you the entire transcript of the code.

<form action="/submit-cat-photo">

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

    <label><input type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label><br>

    <label><input type="checkbox" name="personality" value="loving"> Loving</label>

    <label><input type="checkbox" name="personality" value="lazy"> Lazy</label>

    <label><input type="checkbox" name="personality" value="energetic"> energetic</label><br>

    <input type="text" placeholder="cat photo URL" required>

    <button type="submit">Submit</button>

  </form>

…and link the challenge?

Your issue is that you have made the label text lowercase, when it should have the first letter capitalized.


Next time, please, if you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Hello!
Just write Energetic with capital letter not with small letter.
hope this will help you.

Hi.
This looks like the lesson on Value attribute with radio buttons from the CSS curriculum.

Here is the important stuff:
adding value=

Simply move value=“indoor” after <input type=“radio”. Then rinse and repeat the remaining radiobox and checkboxes.

Looks like : <input type=“radio” value="indoor"name=“indoor-outdoor”> Indoor

Good luck, and you got this!

1 Like

OK themagicbean! Thank you very much for your availability to respond to my concerns. I am working on a challenge and this concerns the use of the ‘value’ attribute with radio buttons and check boxes
I then give you the entire transcript of the code.

<form action="/submit-cat-photo">

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

    <label><input type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label><br>

    <label><input type="checkbox" name="personality" value="loving"> Loving</label>

    <label><input type="checkbox" name="personality" value="lazy"> Lazy</label>

    <label><input type="checkbox" name="personality" value="energetic"> energetic</label><br>

    <input type="text" placeholder="cat photo URL" required>

    <button type="submit">Submit</button>

  </form>

I wrote this but the same error message appear. i dont know what is the problem.

I wrote this but the same error message appear. i dont know what is the problem.

you changed something that should be not changed - specifically the label text: they should be all capitalized but instead you have energetic instead of Energetic

<label><input type="checkbox" name="personality" value="energetic"> energetic</label>
                                                                    ↑
1 Like

I wrote it but the same error message appear.

please show your whole code and what error you are getting exactly

1 Like
<h2>CatPhotoApp</h2>
<main>
  <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>
  <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="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality" value="loving"> Loving</label>
    <label><input type="checkbox" name="personality" value="lazy"> Lazy</label>
    <label><input type="checkbox" name="personality" value="Energetic"> Energetic</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

The errors message is this: One of your checkboxes should have the value attribute of energetic

now you have the opposite problem…

Use the input label text, in lowercase, as the value for the attribute.

1 Like