Design comparison
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
- @JayslenPosted over 1 year ago
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 helpful0@Ben-RickettsPosted over 1 year ago@Jayslen hey man,
my discord is benske#2173. if you could help me a bit with this thatd be so awesome. cheers
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