HTML form has a property that if we press enter key when cursor is focused inside any input field then form will be submitted. So if you filling up a form and you are in between and by mistake you press enter key your data will be submitted which is not completed.
HTML forms are submitted when you press the enter key, no matter in which field the cursor is currently in. For example, if you are filling a form and accidently press enter key on any of the fields, the incomplete data is submitted. Then you have to go back and fill the form all over again, which can be a bit frustating.
So here is a tip on how to disable the default submit behaviour
You can use this code for entire application, even if your page contains multiple forms and they have different IDs. Just put this code inside a common js file and include it in every page.