Product Landing Page Form Submit

I keep failing test #12 on the Product Landing Page project. " When I click the #submit element, the email is submitted to a static page (use this mock URL: https://www.freecodecamp.com/email-submit) that confirms the email address was entered (and that it posted successfully)."

Yet when I enter my email address and click my submit button I am actually successfully redirected to the static freecodecamp page.

Here is my HTML code:

<form id="form" name="form" action="https://www.freecodecamp.com/email-submit" method="POST">
      <input type="email" id="email" required="true" spellcheck="false" placeholder="Enter your email address"/>
      <input type="submit" id="submit" value="Learn More"/>
    </form>
1 Like

Do you have a link to the full code?

Hey there you probably already solved it but in case someone else is also getting the same issue, you’re not alone… I really can’t explain why this is required and I didn’t get the impression from the user stories that you have to do it but try giving one of the input elements a name attribute. It passed the previously failed test for me.

In my case, it was missing the name attribute here it’s my code:

<form id="form" action="https://www.freecodecamp.com/email-submit" class='email col-12' >
    <input id="email" name="email" placeholder="Enter your email address" type="email" value="email" required />
    <br>
    <input id="submit" type="submit" value="submit" required />
    </form>