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

Responsive News Letter Popup

KHLIFI BRAHIM•210
@khlifibrahim
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


Newsletter Sign-up Form with Success Message

This is a simple newsletter sign-up form with a success message solution created using JavaScript, HTML, and CSS. It allows users to input their email address, submit the form, and see a success message if the submission is successful. Additionally, it provides form validation to handle empty fields and incorrectly formatted email addresses.

Table of Contents

  • Overview
  • Demo
  • Installation
  • Usage
  • Contributing
  • License

Overview

The Challenge

The challenge was to build a newsletter sign-up form with the following requirements:

  • Users should be able to add their email and submit the form.
  • A success message with their email should be displayed after a successful submission.
  • Form validation messages should be shown if:
    • The field is left empty.
    • The email address is not formatted correctly.
  • The layout should adapt to different screen sizes.
  • Hover and focus states for interactive elements should be styled.

Demo

You can view a live demo of this solution here.

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/newsletter-signup-form.git
    

Usage

Open the web page in your browser.

Enter your email address in the input field.

Click the "Submit" button.

If the email is valid and not empty, you will see a success message with your email. Otherwise, validation messages will be displayed.

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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 KHLIFI BRAHIM'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