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 with success message using Grid

John Carruthersā€¢ 310

@techyjc

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 managed to keep the entire form post interaction contained within the same page. I normally use PHP for form submissions (POST method combined with the PHP Super-Globals).

I think you can use Fetch in Javascript for the POST method but I've didn't think that was necessary in this case and the form GET method is best avoided for user data.

Used some data attributes in various elements to show/hide various sections. and took advantage of this as you can format with CSS using an attribute selector .something[attrib="value"]

The transition between break points is a little jarring but It's about practice not perfection.

You decide.

Community feedback

@marcusAzevedo93

Posted

Congratulations on solving your challenge! I noticed that you need to move down the address div a bit. You could also bold your h1, increase the font size, and center it. Overall, I really liked it, and I even found yours more beautiful than the original. šŸ˜Š

Marked as helpful

1
John Carruthersā€¢ 310

@techyjc

Posted

Hi Marcus,

Thank you, very kind of you. I had made a few adjustments after you commented but before seeing your comment. The email address on the Subscription Success element is a nested empty 'span' with a class. I push the email address entered by the user into the span using JS '.innerHTML'. I completely forgot to style the element at the time.

I will be updating the email entry form to use regex to validate the correct email address as it's never a good to rely on form elements for proper validation. (Even with HTML 5 feature set). Although probably not as important, as the user could bypass the JS as well.

John Carruthers.

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