Debug a Donation Form - Debug a Donation Form

Tell us what’s happening:

There is a required attribute in my first input and there is a Donation Amount ($): in my label but non of these inputs has been validated. help please have been on this for a while trying to debug but it isn’t working!

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="full-name">Full Name:</label>
    <input type="text" id="full-name" name="full-name" required>

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

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

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

    <!-- 5th Input: Submit Button -->
    <input type="submit" value="Submit">
</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/145.0.0.0 Safari/537.36

Challenge Information:

Debug a Donation Form - Debug a Donation Form

That’s quite strange behaviour. I have no idea what’s causing it as well.

1 Like

it looks like you change the name values, please reset the step and try again without changing those

It got me stucked for hours

Can I share my code so as to see exactly what I am saying, there’s requirement on the code as expected but it’ still asking me to include the required attribute. Please can you help fix.

post your updated code


<form>

 <label for="full-name">Full Name:</label>

  <input type="text" id="full-name" name="full-name" required>

<br />

    <label for="email">Email Address:</label>

    <input type="email" id="email" name="email" required>

<br />

    <label for="donation-amount">Donation Amount ($):</label>

    <input type="number" id="donation-amount" name="donation-amount" required>

<br />

    <label for="subscribe">Subscribe</label>

    <input id="subscribe" type="checkbox" name="subscribe">

<br>

    <!-- 5th Input: Submit Button -->

    <input type="submit" value="Submit">

</form>

Please find the code as requested for correction. Thank you.

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

this comment I left earlier is still valid

I didn’t alter any text. It still didn’t work.

I am sorry, but if you still have the wrong values for the name attributes you are not going to pass this challenge, the name attributes must have the expected values which are those in the starting code of this challege. Please reset the step with the button image and try again

1 Like

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