Search code examples
cordovasencha-touch-2.2

Sencha Touch fieldset label not visible on emulator


I have a form with fieldset as below

 config: {
    centered: true,
    height: 400,
    id: 'inputForm',
    itemId: 'inputForm',
    width: 500,
    hideOnMaskTap: true,
    modal: true,
    items: [
        {
            xtype: 'fieldset',
            title: 'Title',
            id:'inputformfieldset',
            items: [                
                {
                    xtype: 'toolbar',
                    docked: 'bottom',
                    ui: 'light',
                    layout: {
                        type: 'hbox',
                        align: 'center',
                        pack: 'center'
                    },
                    items: [
                        {
                            xtype: 'button',
                            id: 'submitInputFormButton',
                            itemId: 'submitInputFormButton',
                            ui: 'confirm-round',
                            text: 'Submit'
                        },
                        {
                            xtype: 'button',
                            id: 'cancelInputFormButton',
                            itemId: 'cancelInputFormButton',
                            ui: 'decline-round',
                            text: 'Cancel'
                        }
                    ]
                }
            ]
        }
    ]
}

I am dynamically adding the fields to the form. When i run this in chrome,everything works. see screenshot

enter image description here

But when i run in the emulator the field's label is not visible. see screenshot enter image description here

Any ideas?

Update:

I am adding the text field like this.

Ext.getCmp('inputformfieldset').add({
                xtype: fieldType,
                fieldLabel: record.get('name'),
                name: record.get('name')
            });

Solution

  • [DEPRECATE][Ext.field.Field#constructor] 'fieldLabel' config is deprecated, use the 'label' config instead 
    

    This is what is shown in the developer console once i had changed the fieldLabel to label, the label was visible in the emulator.