Design comparison
Solution retrospective
currently when I submit the form the error message or success message flashes and clears in seconds and how can I stop that and show the message unless the user puts the correct information.
Community feedback
- @MSultan9Posted over 4 years ago
To stop the flashing issue you need to add e.preventDefault() inside the button's event listener
2@nikhil-chintawarPosted over 4 years ago@MSultan9 yes I tried that but after that the form is completely stopped working.
0@MSultan9Posted over 4 years ago@nikhil-chintawar submit the form in javascript after validation by selecting the form and adding .submit()
0 - @fogeidPosted over 4 years ago
Man, create 2 divs, in 1 you put the text and in another you put the form, give a display: flex-box and flex-direction: row. Let each div get 50% of the screen width.
1@nikhil-chintawarPosted over 4 years agoYes I did that and on my machine it is showing correctly but when I submitted this on frontendmentor.io this is changed .I think I need to change the media queries.
0
Please log in to post a comment
Log in with GitHubJoin 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