Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis documentation
for users and developers.
Home
Help
Login
Register
Elxis CMS Forum
»
Extensions
»
Components
»
how to disable enter key in administration my component
« previous
next »
Print
Pages: [
1
]
Author
Topic: how to disable enter key in administration my component (Read 3460 times)
cavernik
Newbie
Posts: 2
how to disable enter key in administration my component
«
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?
Logged
ks-net
Elxis Community
Hero Member
Posts: 2072
Kostas Stathopoulos
Re: how to disable enter key in administration my component
«
Reply #1 on:
September 15, 2010, 23:06:02 »
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 text
area
-inputs ... there you can create a new-line
those above have nothing to do with elxis... there are global browser-behaviours
Logged
ks-net.gr
cavernik
Newbie
Posts: 2
Re: how to disable enter key in administration my component
«
Reply #2 on:
September 15, 2010, 23:31:43 »
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.
«
Last Edit: September 17, 2010, 13:51:56 by cavernik
»
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Extensions
»
Components
»
how to disable enter key in administration my component