PDA

View Full Version : [override] form.onReset and form.field.onReset



tobiu
17 Feb 2010, 1:10 AM
hi together,

i put the two overrides here too, because under help they might not get noticed. it would be nice, if they get into the ext-bib someday ;)



Ext.form.BasicForm.override({
reset : function(){
this.items.each(function(f){
f.reset();
});
this.fireEvent('reset', this);
return this;
}
});




Ext.form.Field.override({
reset : function(){
this.setValue(this.originalValue);
this.clearInvalid();
this.fireEvent('reset', this);
}
});


kind regards,
tobiu

clesquir
27 Jan 2011, 12:42 PM
Just so you know, you should remove the space character at the end of the "reset" action ;)


this.fireEvent('reset', this)

tobiu
27 Jan 2011, 2:54 PM
fixed that typo, thx.


best regards
tobiu