extjs - Cloning filefiled in change function -


i have form include filefield like;

enter image description here

is possible? filefile can clone (with file attached) in change function ( if possible, can change attribute textfield,..?)

enter image description here

here filefile http://jsfiddle.net/23tjk/

items: [{         xtype: 'filefield',         name: 'file',         fieldlabel: 'upload',         labelwidth: 50,         msgtarget: 'side',         allowblank: false,         anchor: '100%',         listeners:{         'change': function(f, value){             form.add([f]); // nothing run         }         }     }], 

you can create field variable:

var ffield = {     xtype: 'filefield',     fieldlabel: 'upload',     name: 'file[]', //<--------     labelwidth: 50,     msgtarget: 'side',     allowblank: false,     anchor: '100%',     listeners:{         'change': {             fn: function(f, value) {                 form.add(ffield);             },             single: true // <----------         }     } } 

in form:

... items: [ffield], ... 

see: http://jsfiddle.net/23tjk/1/


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -