PDA

View Full Version : FormPanel default submit action



Lolka
6 Aug 2010, 3:18 AM
Hi,
I use FormPanel and custom handler.
Is it possible to specify default "submit button" -- when user press Enter button on Form?
My FP looks like this:


new Ext.FormPanel({
... panel config ...
items: [
{xtype:'textfield', fieldLabel: 'Somelabel', name: 'somename'},
...
buttons: [{id: "search_button", text: 'Search', handler: function(b, e) { ... };
...

I want "search_button" to be "default submit action" for my FP.
Thanks.

Condor
6 Aug 2010, 3:28 AM
You could use submitOnEnter (http://www.sencha.com/forum/showthread.php?75999-OPEN-771-BasicForm.-submitOnEnter-config).