Prevent Form Submit On Enter Is Not Working - OutSystems
Có thể bạn quan tâm
John JakeRank: #147767Prevent form submit on enter is not working187Views2CommentsSolvedQuestionTrainingI have a text input, this text input have a server action in the On Change Destination to do some stuff when the input value changes.
I want to prevent that the form is submitted if user presses enter in this input. So in the input element in Extended properties I add this:
onkeydown
"return event.key != 'Enter;"
But its not working, when the enter is pressed the form is submitted. Do you know why?
John Jake,
On your keydown event try to put the following code:
SyntaxEditor Code Snippet
"if (window.event.keyCode == 13 ) return false"I tested and it should be enough to achieve what you are trying to do.
Best Regards,
João Delgado
1024 Mar 2020Copy comment link
1 reply07 Oct 2023Show threadHide thread
Henrique ChigumaneRank: #18177thanks, it worked for me!
0007 Oct 2023Copy comment linkTry OutSystems nowGenerate an App with AITừ khóa » Html Form Block Enter Submit
-
Prevent Users From Submitting A Form By Hitting Enter - Stack Overflow
-
Prevent Form Submission On Enter Key Press | Example Code
-
Prevent Form Submit On Enter Code Example - Code Grepper
-
How To Disable Form Submit On Enter Button Using JQuery
-
How To Stop The Enter Key From Submitting The Form - WPForms
-
Prevent Enter Key Submitting Forms With JQuery - Code
-
Prevent Form Submission On Enter Press In React | Bobbyhadz
-
Using JavaScript To Prevent Or Trigger Form Submission When ENTER ...
-
How To Prevent Submit Form On Enter Key Except Textarea In JQuery?
-
The Enter Key Should Submit Forms, Stop Suppressing It - TJ VanToll
-
JavaScript Disable Enter Key On Form Submission
-
Prevent Users From Accidentally Submitting A Form If Enter Key Is ...
-
Easiest Way To Disable Form Submit On Enter Pressed - YouTube
-
Html Form Prevent Submit When Hit Enter On Specific Input