FCC - Landing Page Review & Error Message

Hello Everyone!
I have my landing page for review.

However, there is an error that I have no idea how to fix. Even though my action attribute has the link needed when submitting the form, it still has an error code that occurs. Any assistance on the reason there is still an error is much appreciated.

Here is what I have for my form element below:

<form id="form" target="_blank" action="https://www.freecodecamp.com/email-submit" method="POST">
            <label for="email">
              <input type="email" name="fcc-email" id="email" placeholder="Enter your email here" required>
            <input type="submit" name="submit-button" id="submit" value="SIGN ME UP!" >

@bbs2527, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.

  • Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The failing message says

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 #email element's name attribute should have a value of "email" : expected 'fcc-email' to equal 'email'
AssertionError: The #email element's name attribute should have a value of "email" : expected 'fcc-email' to equal 'email'

Do you see that it’s not the action attribute that is causing the test to fail?

Your page looks good @bbs2527. Some things to revisit;

  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in the HTML editor. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.
    • For instance, links to fonts go in the box labeled ‘Stuff for <head>’
  • Run your HTML code through the W3C validator.
    • There are HTML syntax/coding errors you should be aware of and address.

Ah! Thanks so much for the feedback and suggestions! I didn’t realize the name of the email was incorrect. I made sure to make the necessary updates as suggested by W3C validation.

Everything looks good now :).

1 Like

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