
Design comparison
SolutionDesign
Community feedback
- P@2XG-DEVPosted 5 months ago
Your solution seems a bit incomplete but nice job!
You should try to follow the design closer and use the button:hover attributes to add that nice hover effect with the gradient and colored box shadow in.
You can try to use javascript to get the form and not show the default browser overlay and show your own error like this
const form = document.getElementById("emailForm"); const emailInput = document.getElementById("email"); const errorMessage = document.getElementById("emailError"); form.addEventListener("submit", (event) => { event.preventDefault(); if (!emailInput.validity.valid) { emailInput.classList.add("invalid"); errorMessage.style.display = "block"; } else { emailInput.classList.remove("invalid"); errorMessage.style.display = "none"; // Proceed with form submission or further logic console.log("Form submitted successfully."); isSuccess = true; email = emailInput.value; updateUI(); } });
0
Please log in to post a comment
Log in with GitHubJoin 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