My submit input is not passing the test and I can’t figure out why. I don’t remember there being a lesson about how to get a button to submit somewhere.
OK, so here is your form
:
<form id="form">
<!-- ... -->
<input id="email" type="email" placeholder="Enter email address" required>
<input id="submit" type="submit" name="email" action="https://www.freecodecamp.com/email-submit">
<!-- ... --->
</form>
And this is the failing test:
- When I click the #submit element, the email is submitted to a static page (use this mock URL: https://www.freecodecamp.com/email-submit).
The #form should have an action attribute : expected false to equal true AssertionError: The #form should have an action attribute : expected false to equal true
That is a true statement - your #form
element has no action
attribute - you’ve put that in the wrong place.
When I fix that, I get another error. You can solve that using the same process of reading the failing test closely and closely going over your code. (This is important training for being a programmer.)
When I fix that error, your code passes for me.
All sorted including the error that followed. Thanks for your help and sorry for the really late reply.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.