PDA

View Full Version : collapse & clearInvalid



maestrokame
29 Apr 2011, 2:11 PM
Hi. I'm trying to disable validation when fieldset is collapsed, but it's not working.


new Ext.form.FormPanel({
...
items:[
new Ext.form.FieldSet({
title :'Modificar Contraseņa',
checkboxToggle : true,
collapsed : true,
items:
[
...// item1 & item2
],
listeners:{
collapse:function(){
Ext.getCmp('item1'). clearInvalid();
Ext.getCmp('item2').clearInvalid();
},
expand:function(){
Ext.getCmp('item1'). validate();
Ext.getCmp('item2').validate();
}
}
}),
...
]
});I also tried to apply unsetActiveError(true) and unsetActiveError(false) to each of fieldset.items

What am I doing wrong?

PD: I'm using Ext 3.3.1

maestrokame
29 Apr 2011, 2:22 PM
I don't know why my posted code is not working, but I solved using setDisabled