29er
29er

Reputation: 9005

Ext JS - Cannot get textfield label to show in column layout

Inside my FormPanel , I have a fieldset with a layout of 'column'. I have tried several different config properties but i cannot get the label for my textfield to work. It just renders the textbox without a label. (Obviously, if i make the layout type 'form', i have no issues). The text for the checkboxes shows fine, but the textbox label does not. Can someone point out what is wrong ? thanks!

xtype:'fieldset',
title:'Transaction Status',
layout: 'column',
style:'margin:5px;'
,height:125//or:'-20', allowBlank:false}
,defaultType: 'checkbox'            
,defaults: {
        columnWidth: '.32',
        border: false
          },            

 items: [{
        id:'check1-field',
            name: 'check1',
            boxLabel: 'DOT'
         },{
            id:'check2-field',
            boxLabel: 'Results Matched',
            name: 'check2'
          },{
            xtype:'textfield',
            name: 'testname',                 
            fieldLabel:'This doesnt show'
        }
    ]

Upvotes: 0

Views: 9754

Answers (2)

yagi
yagi

Reputation: 11

I had the same problem with you..

I solved it using panel xtype.

set your checkboxes becomes the items of a panel.

Upvotes: 0

Jason
Jason

Reputation: 1183

Ext Docs for TextField

"This config is only used when this Component is rendered by a Container which has been configured to use the FormLayout layout manager."

So, since you have a layout of "column", I don't think it will render.

Best best is probably to place your check boxes in a separate field set below the text entry boxes, or just remove the column layout style and change it to form (the default).

Upvotes: 1

Related Questions