PDA

View Full Version : Field Set



jaidengre
29 Apr 2009, 9:20 PM
I need functionality like ext js field set. I need to group elements on my page and also need expand collapse feature of ext field set. However I am not using ext form and ext text box etc. Due to some reason we have not converted whole app to ext form and are using html forms and fields on the page. The ext library is already present and I just want to use the fieldset feature from this. Is this possilbe? We can have a div in which I could render the elements that can belong to a particular field set. Please suggest/guide me how to achive this.

Condor
1 May 2009, 7:00 AM
So the inputs are already present in a div? In that case you can simply specify a contentEl in the fieldset config.

jaidengre
3 May 2009, 9:28 PM
I tried using contentEL but somehow the fieldset is just rendered as blank even though the div contains the HTML code. It also has all html formatting with table layout etc and also contains the html input and combo boxes.

var p = new Ext.form.FieldSet({
title: 'My Title',
collapsible:true,
renderTo: 'panel_1',
contentEl: 'panel_1_content'
});

panel_1_content div has the html code.

Also the panel_1_content are not rendered on the document even outside the panel which means that the configuration is working but somehow the fieldset is not able to display the html in the div.

Any clues why this is not working?

jaidengre
3 May 2009, 9:42 PM
I was able to solve this by adding autoHeight property. Thanks a lot for your excellent hint onto this.