PDA

View Full Version : Form Layout Problems



ray73864
21 May 2007, 10:33 PM
I am having a problem with my form layout, for some reason the very first item that is added to the Form appears at the top of the page with all the other items further down the page.

Image of the problem attached to post.

Code to create the form:



Ext.onReady(function(){

Ext.QuickTips.init();

// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';

var addNotice = new Ext.form.Form({
url : 'addNotice.php',
method : 'POST',
labelAlign : 'right',
labelWidth : 145
});

addNotice.add(
new Ext.form.Text({
allowBlank : false,
fieldLabel : 'Name',
name : 'StaffName',
width : 175
}),

new Ext.form.DateField({
allowBlank : false,
fieldLabel : 'Date',
name : 'ItemDate',
width : 175,
format : 'd/m/Y',
value : '22/05/2007'
}),

new Ext.form.DateField({
allowBlank : true,
fieldLabel : 'Expiry Date (Optional) ',
name : 'ExpiryDate',
width : 175,
format : 'd/m/Y',
value : '22/05/2007'
}),

new Ext.form.TextArea({
allowBlank : false,
fieldLabel : 'Message',
name : 'rte1',
grow : true,
preventScrollbars : true
})
);

addNotice.addButton('Create');
addNotice.addButton('Reset');

addNotice.render('form-addNotice');
});

Nullity
22 May 2007, 5:41 AM
Hmm, at a quick glance, that all looks ok. What does your HTML markup look like?