Threaded View

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2013
    Vote Rating
    vicvolk87 is on a distinguished road


    Default Answered: Submitting several filefields

    Hello, guys! Please help, if you know how. The problem is I have a form with three filefields. When the user presses the button, the form is submitted. But instead of submitting all files it sumbits only the last one. Previously I faced a similar problem, when I tried to submit combobox multiple values, and the trick was to name the field with extra brakets - [] in order to treat the field as an array. But in this case I have three unique fields and want to submit them all.

    Really need your help. Thank you, guys!

    PS It would be extremely great if you could share the simplest example with just two filefields.

  2. I see it sending 3 files:

    new Ext.form.Panel({
        renderTo    : document.body,
        title       : 'Test',
        url         : 'data/form.php',
        defaultType : 'filefield',
        items       : [
                fieldLabel : 'One',
                name       : 'one'
                fieldLabel : 'Two',
                name       : 'two'
                fieldLabel : 'Three',
                name       : 'three'
                xtype   : 'button',
                text    : 'Submit',
                handler : function (button) {
                    var form = button.up('form');

Thread Participants: 1