Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Form submit on Enter

  1. #11
    Sencha User Legolas's Avatar
    Join Date
    Apr 2010
    Vote Rating


    Quote Originally Posted by mohaskuar View Post
    i think this is the best way ...i having a problem on my submitLogin(); function be cause my login function accepts a button as an angument
    submitLogin(button); how can i pass any button?on a key press
    mohaskuar, Why do you need this argument? You need this button to rescue your Form? Because your function "submitLogin()" should have as scope your Form.
    I published a post showing how use the class Ext.util.KeyMap, but is in portuguese: Using the class Ext.util.KeyMap. See definition of scope for both methods.
    I hope help you get an idea of how to do.
    I am sorry my english, I am learning yet
    Portuguese blog:
    Twitter: @wlegolas

  2. #12
    Sencha User
    Join Date
    Dec 2016
    Vote Rating

    Default This is the best answer!

    Quote Originally Posted by rrandymeyer View Post
    I implemented it this way according to another post. For each field I added a listener:

                listeners: {
                    specialkey: function(field, e){
                        if (e.getKey() == e.ENTER) {
    The submitLogin() call is the same one the login button calls.
    my code:

    listeners: {
                afterRender: function () {
                    this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {
                        enter: function () {
                        scope: this

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Form submit on Enter
    By egorfine in forum Ext: Discussion
    Replies: 3
    Last Post: 13 Apr 2011, 11:02 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts