I want to force the user when submitting a form on my site without giving them the ability to use the Return key on their keyboard on their phones and force them to use the button.
Having some issues with some messages not working correctly when they do this so I want them to click the button to submit. I have found a ton of similar topics online but most of them relate to using jquery. I dont use that so I need it for a basic HTML form. I tired using
<script language="JavaScript">
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if(key == 13)
return false;
else
return true;
}
</script>
from http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html but that didnt work.
Is this possible?