Due to an issue relating to a horrible mobile device (that work has given me no choice but to work with) I have to stop the use of the enter key from registering in form in HTML. The only way I'd like the data to be submitted is when the submit button is pressed.
Hope this is enough to help work out my problem! If not feel free to ask more.
Try this submit button:
<input type="button" value="Submit" onclick="document.forms[0].submit();" />
Instead of using type="submit", type="button" won't bind the enter key to this button.
You can use an onsubmit
handler to prevent the form from being submitted in cases where it wasn't submitted in the way you wanted it to be. Just return false from the handler to cancel the submission.