Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Javascript Email submission page

@S-LoCascio

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

I'm really proud that the Javascript was actually quite easy! I had some trouble getting the form to work, but at some point it mostly clicked on my own.

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

PROTIP: don't use larger scaling when designing your CSS. I did and then it looked wrong when I uploaded it to Github, making me redo a lot of the things today. Other than that, getting the form to work perfectly was a pain at first, but ultimately doable.

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

Any feedback regarding JS would be immensely helpful!

Community feedback

P
Koda👹 3,810

@kodan96

Posted

hi there! 👋

Instead of creating an array, pushing value to the array and updating the error message depending on that value you can just create the HTML element with the text, hide it with display: none; in CSS and toggle it when the input fields value doesn't get through the validation.

Also you're not validating the email, you just check if there a '@' in it. Mostly email validation is done with JS regular expression and the test method.

Hope this was helpful 🙏 Good luck and happy coding! 💪

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

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