1. #1
    Sencha User
    Join Date
    Sep 2009
    Posts
    10
    Vote Rating
    0
    egorfine is on a distinguished road

      0  

    Default Form submit on Enter

    Form submit on Enter


    I'm terribly ashame to ask such a frequent question, but I have searched for the solution and none works. So the question is obvious: how do I submit my form on Enter key? Yes, in ExtJS4b2.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Posts
    47
    Vote Rating
    0
    jlg is on a distinguished road

      0  

    Default


    I'm also trying to figure this out

  3. #3
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,657
    Vote Rating
    5
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    i guess you have to add it yourself
    http://dev.sencha.com/deploy/ext-4.0...il.KeyNav.html
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  4. #4
    Sencha User
    Join Date
    Jul 2010
    Posts
    35
    Vote Rating
    0
    mmartz is on a distinguished road

      0  

    Default


    This is something that has never been built-in. In the past I've set a listener on the special key event for textfields. You could easily create a FormPanel subclass that did this for you.

    PHP Code:
                xtype'text',
                
    fieldLabel'Field 2',
                
    name'field2',
                
    listeners: {
                    
    specialkey: function(fielde){
                        
    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
                        // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
                        
    if (e.getKey() == e.ENTER) {
                            var 
    form field.up('form').getForm();
                            
    form.submit();
                        }
                    }
                } 

Similar Threads

  1. Ajax Form Submit with Enter Key
    By lenzenc in forum Ext 2.x: Help & Discussion
    Replies: 17
    Last Post: 14 Sep 2010, 7:13 AM
  2. Submit Form with Enter
    By drieraf in forum Ext 2.x: Help & Discussion
    Replies: 14
    Last Post: 28 Apr 2010, 4:19 AM
  3. How to submit a form using the enter key?could anybody please help
    By misra123 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 2 Sep 2008, 1:10 AM
  4. i want Enter key submit my form
    By mnask in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 3 Jul 2008, 1:03 AM
  5. Form without submit button, handling submit with shift+enter...
    By violinista in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jun 2007, 12:02 AM

Thread Participants: 3

Tags for this Thread