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

newsletter made with HTML, CSS & Javascript

@Ben-Ricketts

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


I could not figure out how to integrate into my code to collect the email input value using (localstorage) and then change the text content on the success page. if anyone could give me a solution for that to help me understand that more that would be awesome

Community feedback

Jayslen 220

@Jayslen

Posted

Try to do this in the eventListener function of the button localStorage.setItem('user-email', JSON.stringify(inputValue)) with this line the email would save into the local storage in the inputValue you gonna put the value of the input element. And for read the data in the localStorage you could do this: const email : JSON.parse(localStorage.getItem('user-email')) So the email const woul have the email and then in the paragrah that is in the succes page you could change the text with textContent and put the email.

I hope this help you if not you could tell me your discord and i can help you

Marked as helpful

0

@Ben-Ricketts

Posted

@Jayslen hey man,

my discord is benske#2173. if you could help me a bit with this thatd be so awesome. cheers

0
Jayslen 220

@Jayslen

Posted

@Benske4 i will add you to discord

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