-
gchris2Asked on February 2, 2015 at 12:10 PM
Currently any time I hit the "enter" key while filling out the form, it submits.
-
Kiran Support Team LeadReplied on February 2, 2015 at 12:57 PM
To prevent the form to be submitted by pressing Enter key, you may consider adding required status to the fields on your JotForm.
When the form is tried to submit with blank fields, it displays an error for the fields where they were set as required.
Alternatively, you may also consider getting the source code of the from to embed on your webpage by adding the following script to header section i.e., in between <head></head> tags.
<script language=javascript type=text/javascript>
<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development -->
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}
document.onkeypress = stopRKey;
</script>
Hope this information helps. Please let us know if you need any further assistance.
Thanks!