Don't submit form on "enter"
Is it possible to stop submitting a form when pressing "enter" ?
10 Replies
Does anyone have an Idea on how to do this ?
for this function check the key bindings if the enter button is triggered
Do you have a more concrete exemple how this will look?
I believe:
In your Create Record
This overwrites the create method
How can you then prevent "enter" to submit in this code?
Oh wait
wdym "enter"?
I want to prevent that pressing "enter" submits the form
weird, when I press enter, form doesnt submit
It could be a JS thing
no idee
Um. This is actually how forms work at the browser level. If an input other that select is focused then pressing enter will submit the form. I would also highly recommend against trying to prevent the behavior as doing so would result in accessibility issues since it is the expected behavior.
I know. But some users don't know how browsers work. So maybe I should just tell them that this is the way it works in browsers.