Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

Newsletter sign-up with success message using Grid

John Carruthers•310
@techyjc
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on John Carruthers's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License