ngrover
13 Jun 2007, 4:46 PM
I've looked around and still can't find a way to have nested FieldSets within and Ext Form. The basic idea (or how I thought it should work) is like the following:
// create a form
var someForm = new Ext.form.Form({
.... form config
});
// setup form fieldset
someForm.fieldset({
legend:'some legend'
});
// add form elements to the form
someForm.add(
new Ext.form.Checkbox(...);
);
// create another FieldSet
var innerFieldSet innerFS = new Ext.form.FieldSet({
legend:'inner legend'
});
// ADD SOME FORM ELEMENTS TO INNER FIELDSET ???
someForm.add(innerFieldSet);
someForm.render('form_dom_id');
...... I've tried variations of things but no go. What is the right way to do this?
Edit: perhaps I should be more detailed. so far in EXT i can create one form per fieldset... this seems the natural way to do things in EXT
<form>
<fieldset>
inputs
</fieldset>
</form>
what i want to construct is a structure like this:
<form>
<fieldset>
inputs
<filedset>
more inputs
</fileset>
<filedset>
more inputs
</fieldset>
</fieldset>
</form>
// create a form
var someForm = new Ext.form.Form({
.... form config
});
// setup form fieldset
someForm.fieldset({
legend:'some legend'
});
// add form elements to the form
someForm.add(
new Ext.form.Checkbox(...);
);
// create another FieldSet
var innerFieldSet innerFS = new Ext.form.FieldSet({
legend:'inner legend'
});
// ADD SOME FORM ELEMENTS TO INNER FIELDSET ???
someForm.add(innerFieldSet);
someForm.render('form_dom_id');
...... I've tried variations of things but no go. What is the right way to do this?
Edit: perhaps I should be more detailed. so far in EXT i can create one form per fieldset... this seems the natural way to do things in EXT
<form>
<fieldset>
inputs
</fieldset>
</form>
what i want to construct is a structure like this:
<form>
<fieldset>
inputs
<filedset>
more inputs
</fileset>
<filedset>
more inputs
</fieldset>
</fieldset>
</form>