Debug a Donation Form - Debug a Donation Form

Tell us what’s happening:

Having Issues on Step 11, and cannot solve it at all. It’s telling me I need to associate every input element with a label element using the for and id attributes, but is that not what I’m doing? I even put the input inside the label box and still nothing. Can someone help me figure this out please?

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Donation Form</title>
</head>
<body>
  <h1>Donation Form</h1>
  <form>
    <label for ="fullName">Full Name:
      <input required id="fullName" type="text" name="name">
    </label>

    <label for="emailAddress">Email Address:
      <input required id="emailAddress" type="email" name="email">
    </label>

      <label>Donation Amount ($):
        <input required id="donationAmount" type="number" name="amount">
      </label>

    <input type="checkbox" name="newsletter">
    
    <label for="newsLetter">Subscribe
      <input type="submit" value="send" id="newsLetter">
    </label>

  </form>
</body>
</html>

Your browser information:

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

Challenge Information:

Debug a Donation Form - Debug a Donation Form

Welcome to the forum @daeygur !

Is this label associated with its input element?

Happy coding!

Oh, thank you! I added that, but it’s still showing the same problem ;o;

Hi buddy, if you’re instructed to add the label element with the input element then is means here you need to do put the for element inside the label element and you need to put the id element inside the input element.

<label for="india">India</label>
<input type="text" id="india">

See this how both the label and the input element will get connect with each other here.

Hope you understand.

This is the original starting code:

<input type="checkbox" name="newsletter"></input>
    Subscribe

<input type="submit" value="Send"></input>

And this is your code:

See the issue?

A bit? I removed the label and moved it back to the original spot on all of them: Subscribe Unless, it’s my for and id…but it’s also still saying I’m doing it incorrectly :worried:

Please post your updated code.

removed by moderator

Okay figured it out I swapped the id’s :sob: but now it’s saying I need to ad an id to my required button but I have it added? Unless…it’s on the wrong line.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Donation Form</title>
</head>
<body>
  <h1>Donation Form</h1>
  <form>
    <label for ="fullName">Full Name:</label>
      <input required id="fullName" type="text" name="name">

    <label for="emailAddress">Email Address:</label>
      <input required id="emailAddress" type="email" name="email">

      <label for="donationAmount">Donation Amount ($):</label>
        <input required id="donationAmount" type="number" name="amount">

    <label for="newsLetter">Subscribe</label>
    <input type="checkbox" name="newsletter" id="newsLetter">

      <input required type="submit" value="Send">

  </form>
</body>

Use this format for Label and Input, Bcuz when we talk about Label and Input with for=“” and id=“” then we use this format.

never mind my dyslexia made me read that wrong. My code passed ;0; thank you guys

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Remove the *required attribute from the Input->type->submit