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 sign up

@ribeiroLevi

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


This was the first time that i aplied some js to a project and i coudn't figure out how do change the email in the second screen, can any one help me?

Community feedback

@myj009

Posted

If you are using just js, CSS, HTML without any framework, you can do something like

const inputField = document.getElementById("email");
const userEmailSpan = document.getElementById("user-email");
userEmailSpan.innerText = inputField.value;

Hope this helps

0
Riki Wendri 1,380

@F4YY

Posted

Hi @ribeiroLevi,

Congratulation for successfully completing the challenge, nicely done...

To displaying the second screen thank you message along with the user's email address that has been inputted instead of just static text TESTE, you might need to add JavaScript function, so it will dynamically be inserted into the thank you message.

If you're using react frameworks, it quite simple send user input email address value as props to it. Such like sample snippet below:

<p>
  A confirmation email has been sent to `{props.value}`. Please open
  it and click the button inside to confirm your subscription.
</p>

Hope that could be Helpful. Keep happy coding...

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