Skip to content

feat: Add success message to subscribe form#14

Open
akshay0611 wants to merge 1 commit into
codewithsadee:masterfrom
akshay0611:add-success-message-to-subscribe-form
Open

feat: Add success message to subscribe form#14
akshay0611 wants to merge 1 commit into
codewithsadee:masterfrom
akshay0611:add-success-message-to-subscribe-form

Conversation

@akshay0611
Copy link
Copy Markdown

Summary:
This PR adds a success message to the subscription form in the footer to improve user feedback. After a user submits the form, a success message is displayed to confirm their subscription.

Changes Made:

  • Added a hidden success message element (<p class="success-message">) below the form.
  • Included JavaScript to handle form submission and display the success message dynamically.
  • Ensured the form fields are cleared after submission for a clean user experience.

Testing:

  • Verified that the success message appears after form submission.
  • Tested responsiveness across different screen sizes.
  • Ensured alignment with existing CSS styles and framework conventions.

Related Issue:
Closes #13

Copy link
Copy Markdown

@Imran-imtiaz48 Imran-imtiaz48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code efficiently handles both scroll-based element visibility and a form submission success message. However, there are a few improvements you could make. Since revealElementOnScroll isn't defined in this snippet, ensure it exists before attaching it to scroll and load events to avoid errors. For the form submission handler, consider adding a check to ensure .success-message exists before modifying its display property to prevent potential runtime errors. Additionally, using visibility: hidden and opacity with transitions could create a smoother fade-out effect instead of abruptly hiding the message. Overall, the code is functional but could be refined for better robustness and user experience.

Copy link
Copy Markdown

@codeCraft-Ritik codeCraft-Ritik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! The implementation is clean and easy to understand.”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Success Message to Subscribe Form

3 participants