Debug a Donation Form - Debug a Donation Form

Tell us what’s happening:

  1. Your checkbox input should not have a required attribute.
    Error however I do not have a required attribute.

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="name">Full Name:</label>
        <input type="text" id="name" name="name" required>
        
        <label for="email">Email Address:</label>
        <input type="email" id="email" name="email" required>
        
        <label for="donation">Donation Amount ($):</label>
        <input type="number" id="donation" name="amount" required>
        
        <label for="subscribe">Subscribe</label>
        <input type="checkbox" id="subscribe" name="subscribe">
        
        <input type="submit" value="Send">
    </form>
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

Debug a Donation Form - Debug a Donation Form

You can’t change the names and ids of the elements from what they are at the beginning.

Still don’t understand how I am changing any of the names and id’s when I am not getting errors their, only getting error on the Checkbox input that in my code does not have a “required” element.

Imagine the test selects the checkbox by it’s “name” attribute.

It will select the original “name” attribute and it does not exist, therefore that test fails. Does not really matter in that case if it has the required element or not, since the test cannot find it.

Thanks man! oh dear how I missed that is beyond me!

Don’t do anything that the instructions don’t ask you to do.

Don’t copy code from the forum.

1 Like