View Full Version : hide/show fields with label

20 Jul 2009, 4:29 PM
I want to know if Ext 3.0 has the functionality to show/hide a field including the label.

As far as I know, you can set the field to start in hide mode with "hidden" config option.
Also, you can hide the label with "hideLabel" config option.

But let say, I need to create a form with a hiddenfield, then show it when necessary.
I can use the method "show()" But that only shows the field, not the label.
One could expect to find a "showLabel()" method. But there is none.

Seems that this issue has been out there for a long time.

There is a workound since Ext 1.x

,onHide: function(){this.getEl().up('.x-form-item').setDisplayed(false);}
,onShow: function(){this.getEl().up('.x-form-item').setDisplayed(true);}

But when I show the field (in this case a combo), look what I get (see attachment, you'll the the combo selection arrow on the left side, which unfortunately is not clickable).


I don't have any problem with IE, Firefox, Chrome and Opera.

Any Idea ?

21 Jul 2009, 1:12 AM
No, Ext 3 still doesn't support hiding the fieldLabel. BTW there is a better fix available here (http://extjs.com/forum/showthread.php?p=120152#post120152).

If you use that fix you could solve your problem by adding hideMode:'offsets' to your combobox.