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

Form success message with vanilla js

Adrian 270

@EidrianMax

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

Community feedback

Adrian 270

@EidrianMax

Posted

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
})
0

@Beckyshee

Posted

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?

0

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