Results 1 to 3 of 3

Thread: [SOLVED][Ext 3.0] FormPanel submit empty POST

  1. #1

    Default [SOLVED][Ext 3.0] FormPanel submit empty POST

    This basic example work in ext V 2.2, the form is correctly submited and i can read my field value in server side.

    Code:
    var login = new Ext.FormPanel( {
                url :'auth/login',
                            method :'POST',
                defaultType :'textfield',
                monitorValid :true,
                items : [ {
                    fieldLabel :'Utilisateur',
                    id :'username',
                    name :'username',
                    allowBlank :false
                }, {
                    fieldLabel :'Mot de passe',
                    id :'password',
                    name :'password',
                    inputType :'password',
                    allowBlank :false
                }],
    
                buttons : [ {
                    text :'Login',
                    formBind :true,
                    handler : function() {
    
                        login.getForm().submit()
                    }
                } ]
            });
    But with ext 3.0 i have an empty POST.

    with this code i have my two parameters submited correctly
    Code:
    login.getForm().submit({params :
                           id :01
                           test:'jjjj'})
    there is any explication ?

    (standardSubmit)

  2. #2
    Touch Premium Member
    Join Date
    Sep 2008
    Location
    Orange County, CA, USA
    Posts
    186

    Default I checked the code

    Code:
    Ext.onReady(function(){
    
        Ext.QuickTips.init();
    
        var login = new Ext.FormPanel( {
            url :'auth/login',
            method :'POST',
            defaultType :'textfield',
            monitorValid :true,
            items : [{
                fieldLabel :'Utilisateur',
                id :'username',
                name :'username',
                allowBlank :false
            }, {
                fieldLabel :'Mot de passe',
                id :'password',
                name :'password',
                inputType :'password',
                allowBlank :false
            }],
            buttons : [ 
                {
                    text :'Login',
                    formBind :true,
                    handler : function() {
                        login.getForm().submit()
                    }
                }
            ]
        });
        var mainPanel = new Ext.Panel({
            layout:'fit'
            ,height:500
            ,width:500
            ,items:[
                login
            ]
        });
    
        mainPanel.render(document.body);
    });
    This code, submits the values correctly. Standard submit does an automatic redirect to the submission target (auth/login) just like a vanilla HTML submit. I don't know if you want that or not.

  3. #3

    Default

    Problem resloved, i have this in my FormPanel header

    Code:
    el: 'login-box'

Posting Permissions

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