Disable form submit on enter keypress

English! place to talk about development, programming and coding
Post Reply
robertoi
Znuny newbie
Posts: 3
Joined: 05 Aug 2011, 16:25
Znuny Version: 3.0.4

Disable form submit on enter keypress

Post by robertoi »

Hi,
can I disable form submit on enter keypress when i compose a ticket?

Tanks

Roberto
Alexander Halle
Znuny expert
Posts: 296
Joined: 04 Jul 2010, 17:49
Znuny Version: 3.1.x
Real Name: Alexander Halle
Company: radprax MVZ GmbH
Location: Wuppertal
Contact:

Re: Disable form submit on enter keypress

Post by Alexander Halle »

I find it difficult to understand your question. Could you please explain your use case or give some details ?
Alexander Halle System: OTRS 3.1.x, Ubuntu 10.04.x LTS, MySQL 5.1.x, Apache 2.2.x
OTRS Community Links: User Meetings, Projects
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Disable form submit on enter keypress

Post by MichaelR »

If you are focused in a HTML form and hit the enter key, your browser will attempt to 'submit' the form.

It is a browser related function I think. You might be able to capture the key-press in javascript and do nothing with it....
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Re: Disable form submit on enter keypress

Post by danchitu86 »

Hello!

Is there a way to apply this: http://support.microsoft.com/kb/298498 on OTRS 3.2.3?
By mistake, instead on enter a new line in the response to the customer, you "press" the submit button.

Thanks a lot!
Dan
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Disable form submit on enter keypress

Post by crythias »

one way I know that also works is to have a field, such as the time units, as a required field. That way you *have* to put something in there (and Time Units is at the bottom, so it's typically last) and the form won't submit without data in the required field.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Re: Disable form submit on enter keypress

Post by danchitu86 »

Great idea, but how can I make the time accounting a required field?

Thanks a lot! Is there in Sys Config?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Disable form submit on enter keypress

Post by crythias »

OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply