PDA

View Full Version : [HELP] Submit on enter not set by default?



Phunky
4 Feb 2008, 2:51 AM
I'm just looking through some examples that i can find on the forum for Ext.KeyNav to enable my forms to be able to be submitted via the enter key like most people expect.

Is there any reason why this is not a default action for a form?? Is it left out in case someone would like to remap the enter key to something else??

It just that im struggling to get Ext.KeyNav to work for some unknown reason and also im curious why such functionality is not here by default when things like ESC to close a window is?

Cheers

Condor
4 Feb 2008, 3:56 AM
1. FormPanel doesn't have a submit button. You'll have to create one yourself and add an Enter keyhandler.
2. Window does have a KeyMap (see getKeyMap and the keys config option). An Esc handler will be added by default if closable:true.

Phunky
4 Feb 2008, 3:58 AM
I understand that Condor but almost any form's will at least let you press Enter to submit them once you tab on to them wont they?

Just seems to be a missing bit of default UI

Condor
4 Feb 2008, 4:03 AM
IMHO there are still too many solutions that don't have a standard submit and cancel button.

But an Ext.ux.FormWindow user extension would be a nice addition...

Phunky
4 Feb 2008, 5:16 AM
Yes, that would be :)

So i guess adding a KeyMap is my only option for now?