Hybrid View

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    24
    Vote Rating
    0
    deepak.sharma is on a distinguished road

      0  

    Default Unanswered: Cant able to submit form items.

    Unanswered: Cant able to submit form items.


    I am getting problem in submission of form( xtype:'form').While submitting form the params values are getting submitted but the items that are there in form are not getting submitted. I have tried the same by changing params to baseParams but still facing the same problem. form.form.submit({ url: params:{ //items mentioned here are getting submitted } }); BUT I need the items that are there in the form to be submitted along with params or baseParams items. form.getForm().submit() is also creating the same problem.

  2. #2
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Vote Rating
    27
    Answers
    106
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    Can you please post a code sample which shows the form layout and items which you're trying to submit?

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    24
    Vote Rating
    0
    deepak.sharma is on a distinguished road

      0  

    Default Code sample

    Code sample


    xtype:'form', id:'ABCD', listeners: { show: function(){ }, border:false, items:[{ layout:"column", defaults:{ border:false, bodyStyle:"padding:5px" }, items:[{ columnWidth:0.5, items:[{ xtype:"fieldset", title:'ABCD' autoHeight:true, items:[{ layout:"column", defaults:{ border:false }, border:false, items:[{}] ** This form is being fetched from the server in run time using loader config option in the body of the tab panel. LOADER CODE: loader:{ loadMask:true, params: { html:ABCD }, url : 'ABCD', renderer:'component', // loadOn: 'show' autoLoad:true, target:'tab_this' },

  4. #4
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Vote Rating
    27
    Answers
    106
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    Your form layout looks to be badly broken/syntactically incorrect. It appears that you're trying to add object properties and an items collection inside of the listeners block of your form config.

    Visit the Ext.form.Panel API documentation and in particular see the Example usage section for good example of laying out a form.

    Also, a form is usually loaded by calling its load() method, something like this:

    Code:
    someForm.load({
      url: 'someUrl',
      params: {
        someRequestParameter: someValue
      },
      success: function(basicForm, action) {
        // do something.
      },
      failure: function(basicForm, action) {
        // do something.
      }
    });

  5. #5
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    24
    Vote Rating
    0
    deepak.sharma is on a distinguished road

      0  

    Default CANT ABLE TO SUBMIT THE FORM ITEMS

    CANT ABLE TO SUBMIT THE FORM ITEMS


    {
    xtype:"form",
    id:"some_ID",
    url: SOME_URL,
    listeners: {
    "show": SOME METHOD CALL
    ,"afterlayout": function(){Ext.Function.defer(SOME_METHOD,50);}
    ,"activate": function(){ }
    },
    border:false,
    items:[{
    layout:"column",
    border:false,
    defaults:{
    border:false,
    bodyStyle:"padding:5px"
    },
    items:[{
    columnWidth:0.5,
    items:[{
    xtype:"fieldset",
    title:"SOME_ID",
    autoHeight:true,
    items:[

    ]
    },{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelWidth:130
    },
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    items:[]
    }]
    }]
    }]
    }]
    },{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelWidth:130
    },
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    items:[]
    }]
    }]
    }]
    }]
    }]
    },{
    columnWidth:0.5,
    items:[{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[

    ]
    },{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelWidth:120,
    labelAlign:"right"
    },
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelAlign:"left"
    },
    labelAlign:"left",
    items:[

    ]
    }]
    }]
    }]
    }]
    },{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelWidth:120,
    labelAlign:"right"
    },
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelAlign:"left"
    },
    labelAlign:"left",
    items:[

    ]
    }]
    }]
    }]
    }]
    },{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelWidth:120,
    labelAlign:"right"
    },
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelAlign:"left"
    },
    labelAlign:"left",
    items:[

    ]
    }]
    }]
    }]
    }]
    },{
    xtype:"fieldset",
    title:"SOME_TITLE",
    autoHeight:true,
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelWidth:120,
    labelAlign:"right"
    },
    items:[{
    layout:"column",
    defaults:{
    //layout: "form",
    border:false
    },
    border:false,
    items:[{
    columnWidth:1,
    defaults:{
    labelAlign:"left"
    },
    labelAlign:"left",
    items:[]
    }]
    }]
    }]
    }]
    },

    ]
    }]
    }]
    }

    This is the complete form that is submitted but still getting the same problem.The params that are passed are getting successfully submitted but the items are not getting submitted.

  6. #6
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Vote Rating
    27
    Answers
    106
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    If you would, please wrap your code snippets in "code" tags and indent the code properly; otherwise, it's near impossible to read.

    The layout you posted doesn't seem to contain any form fields to be submitted. The code sample also seems to be badly over-nested.

    Keep in mind that only form fields which have a name attribute/value are posted when you submit your form.

Thread Participants: 1