Answers for "how to disable submit when hitting enter"

6

html disable enter submit

//per form disabling
<form ... onkeydown="return event.key != 'Enter';">
 
  
//or with jquery  
<script>
 $(document).on("keydown", "form", function(event) { 
    return event.key != "Enter";
});
 </script>
Posted by: Guest on August-26-2020
1

Disable auto submit when hitting enter key

<form onsubmit="return false"></form>
Posted by: Guest on August-20-2020

Code answers related to "how to disable submit when hitting enter"

Browse Popular Code Answers by Language