PDA

View Full Version : [CLOSED] MVC - FormPanel - Prevent submit when pressing ENTER



thchuong
Sep 19, 2014, 7:04 PM
Hi,

I press ENTER in one of fields of formpanel then it redirects to home page. Could you tell me how to prevent that?

Thanks in advance.

fabricio.murta
Sep 19, 2014, 8:55 PM
You can override default key bindings with the ext:KeyMap. Probably the key with Code="ENTER" is bound to trigger the form submit action by default.

I think you can get the figure of how to handle this with the following example:
http://examples2.ext.net/#/Keys/KeyMap/BorderLayout_Regions_Toggle/

I hope this helps.

Daniil
Sep 22, 2014, 12:48 PM
Hi @thchuong,

Is there not the only submittable field on the page? Just it looks that you are facing this:
http://forums.ext.net/showthread.php?22424