I want to display the label on top of text field, but it is not displaying. Below is the code.(in fact the below code displays the label at the right side of text field).I am using extjs 3.4, note : Using form panel is also not working as expected (have pasted the code below)
Any help is much appreciated.
Ext.onReady(function () {
var contentsPanel = new Ext.Panel({
labelAlign: 'top',
renderTo: Ext.getBody(),
layout: 'form',
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first'
}]
});
contentsPanel.show();
});
Ext.onReady(function () {
var contentsPanel = new Ext.form.FormPanel({
renderTo: Ext.getBody(),
defaultType: 'textfield',
labelAlign: 'top',
items: [{
fieldLabel: 'First Name',
name: 'first',
labelAlign: 'top'
}]
});
contentsPanel.show();
});