Elxis CMS Forum
Extensions => Components => Topic started by: cavernik on September 15, 2010, 22:40:57
-
Hi,
I'm writing my component (gallery) and recently noticed by accident, that when I add a new category (of my gallery component) in administration panel and click on input (type=text) and hit [enter] key, the form is submitted. How to disable such behavior and let only toolbar buttons submit form?
-
this a global browser-behaviour ... on any form in every site
- do not use enter-key! on text-inputs you ca not change-make newlines in simple text-inputs
- you can use enter-key only in textarea-inputs ... there you can create a new-line
those above have nothing to do with elxis... there are global browser-behaviours
-
well, in other components (even when adding a new section or category) there're text inputs, which don't react when I press enter key, and I'm curious, what script/function/variable stands behind that?
OK. So I added one more text input field and now it works fine, just like other components. It seems that if you have just one text field in the "adminForm", it submits on enter key press.