PDA

View Full Version : fieldset questions



heidtmare
3 Aug 2007, 5:03 AM
how to i place a button inside of a fieldset?


myForm.fieldset(
{legend: 'Temporal'},
new Ext.form.DateField({
fieldLabel: 'Start',
name: 'start_date[]',
width:175,
format:'Y-m-d H:i:s',
emptyText:'yyyy-mm-dd h:m:s'
}),
new Ext.form.DateField({
fieldLabel: 'End',
name: 'end_date[]',
width:175,
format:'Y-m-d H:i:s',
emptyText:'yyyy-mm-dd h:m:s'
}),
//I want to put a button here...how do i do that?
);and, using the above formatting, how would I nest fieldsets?

I tried this :

myForm.fieldset(
{legend: 'Temporal'},
new Ext.form.fieldset(
{legend: 'Date Range'},
new Ext.form.DateField({
fieldLabel: 'Start',
name: 'start_date[]',
width:175,
format:'Y-m-d H:i:s',
emptyText:'yyyy-mm-dd h:m:s'
}),
new Ext.form.DateField({
fieldLabel: 'End',
name: 'end_date[]',
width:175,
format:'Y-m-d H:i:s',
emptyText:'yyyy-mm-dd h:m:s'
})
)
);But that didn't do so well :(

sj137
3 Aug 2007, 5:53 AM
not sure how to nest fieldsets but for buttons:

goto http://extjs.com/deploy/ext/docs/

in the left column, go to example&demos>form&combobox>dynamic forms

in the last example there is a button in the top right fieldset, check the code to see how it's done...

;)