PDA

View Full Version : [FIXED-1065] BasicForm.getFormFields includes disabled Fields



Animal
21 Jun 2010, 2:42 AM
This is contrary to standards.

The fix needs to be




getFieldValues : function(dirtyOnly){
var o = {},
n,
key,
val;
this.items.each(function(f) {
if (!f.disabled && (dirtyOnly !== true || f.isDirty())) {
n = f.getName();
key = o[n];
val = f.getValue();

if(Ext.isDefined(key)){
if(Ext.isArray(key)){
o[n].push(val);
}else{
o[n] = [key, val];
}
}else{
o[n] = val;
}
}
});
return o;
},