newsletter

Solution retrospective
i did this in one sitting, took me over three hours tho lol , i am too freaking slow, and this is a very easy one
What challenges did you encounter, and how did you overcome them?none
What specific areas of your project would you like help with?my earlier project i was advised to make use of the BEM methodology in future projects, so i did some research on it and tried to to apply it here, turns out i dont fully understand it yet, so i abandoned it and ended up sticking with what i know. any help on that would be very much appreciated
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Stryde2022
thank you for the feedback i really appreciate bro
- @dylan-dot-c
Yo bro! This is a good solution but there are a few stuff you need to cover...
- Html forms, here you can wrap it in a form tag and that will give you some added functionality. Mainly how you added the validation, but the form still submits for an empty string. So first wrap the code in a form element. Add
<button type="submit"/>
add an eventlistener to the form tag.onSubmit
. And check the email value, if its wrong, you can have a variable that outputs the error or usereturn
which should stop the form from submitting.
<input type="email" name="email" id="email" placeholder="email@company.com"> <button class="suscribe-btn"> Subscribe to monthly newsletter </button>
Overall good solution, make sure to test the website thoroughly so you know everything works as expected. Also in some cases you can relay on HTML validation like required and pattern.
- Html forms, here you can wrap it in a form tag and that will give you some added functionality. Mainly how you added the validation, but the form still submits for an empty string. So first wrap the code in a form element. Add
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