Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Responsive Newsletter

José Mama•240
@codesByJose
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

im so proud that my javascript skills have improved!! im feeling like a god already!!!!!!.. for sometime now i have had some issues with mobile responsiveness but i continued to do it by now i already know how to get the mobile to be responsive and im super proud of all of this.. this is my best work yet and i am looking forward to so much more.

What challenges did you encounter, and how did you overcome them?

had some little stress with java script. yes but over came it. im still looking forward to learning diverse ways of implementing java script.

What specific areas of your project would you like help with?

all feedbacks are welcomed

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Dylan Heslop•2,440
    @dylan-dot-c
    Posted 11 months ago

    Congratulations on completing this challenge, good job.

    In terms of design, you did well, only issue is that you didn't add any padding to the input element and the website isn't responsive for smaller screens as well as the design is a different.

    For functionality I like that you actually have a separate page for the success element, most people(including myself) used a framework and state to replace the whole container. But there is one issue on that side, the email you have is static and I believe that it should match whatever email that is entered into the input field. So what I suggest is that you find a way to send the email entered from the first page to the second one, and what better way to do so that htmlQueryParams and what makes it even easier on your side is when you did this:

    <form action='success.html' id='form'>
    

    This makes that when you submit your form it will go directly to that page and pass any information entered into your form to the success page through htmlQueryParams, but one small detail you missed out was to actually include a name property in your input field so thats how data is passed and thats why its good to have a name property. So your new code should now be:

     <input placeholder="email@company.com" id="email" name="email">
    

    and then you can just use URLQueryParams to get the email property and the use it to replace the default email that you have there.

    const queryString = window.location.search
    const params = new URLSearchParams(queryString)
    const email = params.get('email')
    

    And ofcourse you can do some extra checks to make sure everything is good like using the .has method to make sure it exists and you can reuse your isEmail function to make sure its actually good and if not show some kind of error message.

    All the best.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub