Subscription form with email validation

Solution retrospective
I am most proud of getting the validation to work, & am excited to get more used to doing that.
What specific areas of your project would you like help with?As usual, anything I could improve on, do simpler, etc. Thank you!
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@Stv-devl
Hi, good work. However, you don't need to add these lines in your JavaScript :
function onload() { //happens when page is loaded dismissBlock.classList.add('hidden'); errorMsg.classList.add('hidden'); } onload();
if you set the element to be hidden by default in your HTML. For example :<div id="success-container" class="hidden"> Then, once the validation is successful, you can simply remove the hidden class via your javaScript to display the element (same for the error message).
Marked as helpful
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