PDA

View Full Version : Put HTML snippet in Ext.form.FormPanel?



Westside
24 Sep 2008, 3:01 PM
Hi,

Is there a way to put an HTML snippet or a paragraph for example at the top of an Ext.form.FormPanel? I wanted to put some text at the top of the form, like some instructions for example.

Thanks,

-Westside

ext_fan
24 Sep 2008, 4:02 PM
In the formpanel items array, use html attribute like

form = new Ext.form.FormPanel({
//attributes
items:[{
// first item
items:[html:' <p> content </p>']
},{
// then list of items
}]

Condor
24 Sep 2008, 11:10 PM
The would create an Ext.Panel. Using an Ext.BoxComponent has much less overhead:


form = new Ext.form.FormPanel({
...
items:[{
xtype: 'box',
autoEl: {cn: ' <p> content </p>'
},{
...
}]
});