I want the user to be able to click submit, but if the correct fields aren’t filled out it will not go through and errors will appear. Is this possible? I know how to do the errors part, but the blocking submit part is annoying.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Handle the submit event on the form:
If you call the
event.preventDefault()method in an event handler it stops the default action for that event from happening, where in the case of the submit event the default is of course to submit the form…