You found a bug! We've classified it as TOUCH-1204 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User semiaddict's Avatar
    Join Date
    Mar 2010
    Posts
    45
    Vote Rating
    2
    semiaddict is on a distinguished road

      0  

    Default Alter form data using the beforesubmit event

    Alter form data using the beforesubmit event


    According to the documentation of the event beforesubmit in Ext.form.Panel , I should be able to modify the values submitted, but I can't figure out how.

    Implementations may adjust submitted form values or options prior to execution.
    I've tried modifying the variable values, but this has no effect.

    Any help is highly appreciated.

    Note: I'm basically trying to send a JSON string, so I need to encode the values using JSON.stringify.
    ---
    Oussama Mubarak // Semiaddict

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This looks like a bug. Thanks for the report.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This is working for me, using the following block of code:

    Code:
    var form = Ext.Viewport.add({
        xtype: 'formpanel',
        items: [
            {
                xtype: 'textfield',
                label: 'one',
                name: 'name',
                value: 'go'
            },
            {
                docked: 'bottom',
                xtype: 'toolbar',
                items: [
                    {
                        xtype: 'button',
                        text: 'submit',
                        handler: function() {
                            form.submit({
                                method: 'POST',
                                url: 'test'
                            });
                        }
                    }
                ]
            }
        ],
        listeners: {
            beforesubmit: function(form, values, options) {
                values.test = "hello";
            }
        }
    });
    This will post: 'name=go&test=hello'

    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #4
    Sencha User
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    187
    Vote Rating
    0
    mschering is on a distinguished road

      0  

    Default


    This does not seem to work in ST 2.3.1!
    Building Group-Office (http://www.group-office.com) with ExtJS: http://http://demo.group-office.eu user: demo / pass: demo

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar