How can I stop the 'Return' button from triggering the submit button?

  • Profile Image
    Asked on April 29, 2016 at 01:47 AM
  • Profile Image
    Answered on April 29, 2016 at 04:39 AM

    If you want to prevent submitting the form when user presses the return key you can add the following code between your head tags.

    <script language=javascript type=text/javascript>

    <!-- Script courtesy of - Your Guide to Professional Web Site Design and Development 

    function stopRKey(evt) {

       var evt = (evt) ? evt : ((event) ? event : null);

       var node = ( ? : ((evt.srcElement) ? evt.srcElement : null);

       if ((evt.keyCode == 13) && (node.type=="text")) {return false;}


    document.onkeypress = stopRKey; 




    To do that, you need to download your source code.

    If this does not resolve the issue, please let us know and we will be glad to take another look.