I have a form.
When someone hits enter inside the from when they are filling it out, it submits the form.
how do i disable that option so the only way for the user to submit the form is to click on the submit button?
<input type="button" onclick="document.frm1.submit();"> Just change your submit button to a normal button and make its onclick event submit the form.
Actually is not right, a form without a submit button, when a user hit enter, the form still will submit if the user place the cursor on one of the elements in the form. The best way is do a check at onSubmit event. ------------------
Freedom is a Right
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.