PDA

View Full Version : How to do following layout in proper and easy way



robocik
19 Aug 2007, 12:57 PM
Hello

I'm starting with Ext ... ;-) I' gonna to prepare following form layout: (see attachement)


Can anybody point me the way how to add additional elements (labels and so on) before, after, above or at bottom of TextField.

So far I've create simple code rendering basic TextFields:


Ext.onReady(function()
{
var f1 = new Ext.form.Form({
labelAlign: 'right',
labelWidth: 80
});
//-----------------------------------------------------------------------
// field

fs1=f1.fieldset(
{legend:'Test kolumny',
labelSeparator: ''
}
);

f1.column({style: "margin:2px" });

f1.add(
new Ext.form.TextField({
fieldLabel: 'Job Title',
name: 'title',
value: 'Jr. Developer'
}),
new Ext.form.TextField({
fieldLabel: 'Company',
name: 'company',
value: 'Ext JSJS'
})
);

f1.end(); // 1 column

f1.column({style: "margin:2px" });

f1.add(
new Ext.form.TextField({
fieldLabel: 'Company 2',
name: 'company',
value: 'Ext JS'
})
);

f1.end(); // 2 column

f1.end(); // fieldset

f1.render('some_data')
};

//-----------------------------------------------------------------------

Thanx for any advices ;-)