Form success message with vanilla js

Please log in to post a comment
Log in with GitHubCommunity feedback
- @EidrianMax
I do not fully understand the question, but if you want to return the email that was given as successful, you can save it in a variable when you submit the form and then paint it in the ui.
form.addEventListener('submit', (event) => { event.preventDefault() validateEmail(email.value) // save email const emailSuccess = email.value // then print in ui feedback.textContent = emailSuccess })
- @Beckyshee
Hi I really like how you approached it is there any way you could make the success email return the email used to log in?
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