Notifications
Clear all

[Solved] Hiding a hidden field's label

1 Posts
1 Users
0 Reactions
1,011 Views
0
Topic starter

I'm dynamically hiding a field using field.setVisible(false) but its label is still displayed. Is there an easy way to hide the label too?

1 Answer
0
Topic starter

Ext.layout.FormLayout has a property called trackLabels which, if set to true, will show/hide labels when the corresponding field is shown/hidden. You can set this on whatever container has the form layout set using the layoutConfig property:

{
  xtype: 'container'
  ,layout: 'form'
  ,layoutConfig: { trackLabels: true }
  ...
}