Action attribute not working?

Hi fellas, I’m currently having a bit of trouble with a form on the product landing page project. This is my code:

    <p id="contact" for="email">Enter your E-mail here in case of wishing to contact us for an order</p>
    <form id="form" action="">
      <input id="email" type="email" placeholder="Enter your E-mail here" required>
      <input id="submit" type="submit" value="Submit">

When clicking on the submit button, I get an error on Google that says something like this:
“The page has rejected the connection”. Maybe not exactly the same because I translated it from spanish, but anyway, y’all get it.

And more importantly, the tester marks it as wrong, obviously. Stating this:
"## 12. When I click the #submit element, the email is submitted to a static page (use this mock URL:

The #email input should have a name attribute : expected false to equal true
AssertionError: The #email input should have a name attribute : expected false to equal true"

Already tried adding the “name” attribute, but I don’t think that’s it.

Is my code wrong?

Hello and welcome to the freeCodeCamp community~!

The URL the test suite provides is a dummy URL. It won’t actually perform an action. That error you get should not be affecting the test script.

However, the code you have shared does not have a name attribute on your email input element. :slight_smile:

Hi, THANK YOU SO MUCH for welcoming, and helping.
I had placed a name attribute, form inside . Now its working.

1 Like