First, the FormPanel listener is not needed, because the FormPanel will not fire any "select" events on its own events. You must add listeners to the components inside the FormPanel to listen for the specified events that the component triggers.
In your case, it is simple as shown below:
var typeIDcombo = new Ext.form.ComboBox({
fieldLabel: 'Type',
name: 'typeid',
store: typeIdData,
displayField:'name',
valueField: 'typeid',
hiddenName: 'typeid',
typeAhead: false,
mode: 'local',
triggerAction: 'all',
emptyText:'Selecteer het type link',
forceSelection: true,
selectOnFocus:true,
allowBlank: false,
value: 'Selecteer een type',
listeners:{
select:function(field, newVal, oldVal){
if(newVal == 'HIDE_SOMETHING'){
Ext.getCmp('fieldId').hide();
Ext.getCmp('formId').doLayout();
}
else if(newVal == 'SHOW_SOMETHING'){
Ext.getCmp('fieldId').show();
Ext.getCmp('formId').doLayout();
}
}
}
});
source
share