PDA

View Full Version : adding non-form element content to formpanel



nwatkins
16 Aug 2008, 8:05 AM
I want to know what the standard practice is for mixing non-form elements (e.g. text) with form elements to create a layout.

For example i would like to visually have my form as follows:

------
<Some paragraph of text>
<some form elements>
<another paragraph>
<a fieldset>
------

Logically they are the same form, but I am having difficulties with the layout.

Thanks,
Noah

Animal
16 Aug 2008, 10:56 PM
You can add arbitrary HTML by including an item which looks like



{
xtype: 'component',
autoEl: {tag: 'p', html: 'Paragraph content'} // a DomHelper specification. See API docs
}


or



{
xtype: 'component',
autoEl: {}, // will default to creating a DIV
html: 'The HTML <i>which may include tags</i> you want inside the above element'
}