-
3 May 2007 4:28 AM #11
Seldon, can you post an example. I can't seem to get it to work.
Thanks
-
4 May 2007 1:04 PM #12
Here you can see the source of a working example

Code:Ext.onReady(function(){ var frm = new Ext.form.Form({ autoCreate:false, labelWidth: 75 }); var frmTabs = new Array(); frmTabs[0] = frm.container( {el:Ext.DomHelper.append(Ext.get('divForm'), {tag:'div', style:'padding:20px'})}, new Ext.form.TextField({ fieldLabel: 'First Name', name: 'first', width:175 }), new Ext.form.TextField({ fieldLabel: 'Last Name', name: 'last', width:175 }), new Ext.form.TextField({ fieldLabel: 'Email', name: 'email', vtype:'email', width:175 }) ); frmTabs[1] = frm.container( {el:Ext.DomHelper.append(Ext.get('divForm'), {tag:'div', style:'padding:20px'})}, new Ext.form.TextField({ fieldLabel: 'Company', name: 'company', width:175 }), new Ext.form.TextField({ fieldLabel: 'Branch', name: 'branch', width:175 }) ); frm.render('divForm'); var tabPanel=new Ext.TabPanel('divTabPanel'); tabPanel.addTab(frmTabs[0].getEl().id,'Personal'); tabPanel.addTab(frmTabs[1].getEl().id,'Company'); tabPanel.activate(0); });BrCode:<div id="divForm"> <div id="divTabPanel"></div> </div>
Wolfgang
-
4 May 2007 1:12 PM #13
In your sample i'm missing the form tag around the input controls. Is that correct?
Thanks
Marco
-
5 May 2007 5:17 AM #14
-
6 May 2007 12:41 AM #15
@mdissel
no this was not correct
I overworked the example. Now the form tag is duly created around the input tags
Furthermore you can see in the source that I assigned the tabs to a form container.
This enables you to controll the position of the tabs inside the layout stack of the form.Code:// container for tabs var frmContainerTabs = frm.container(); frm.end(); ... var tabPanel=new Ext.TabPanel(frmContainerTabs.el);
Br
Wolfgang
-
7 May 2007 1:30 AM #16
FYI: the overrides that i mentioned are necessary when you want the form tabs to be the contentpanel tabs of a layout region. (that's the scenario that i described)
-
8 May 2007 7:06 PM #17
How to create the tabbed form within a basic dialog that is created on the fly.
-
23 May 2007 10:50 PM #18
fieldset into container
fieldset into container
Hey friends, the example is good. but I have a problem I want group my fields like a fieldset in every tabs, but if I apply a fieldset into form.container ( frm.fieldset() ) I get a problem, the fieldset is repeat into 2 tabs. I dont know how fix this problem, I attach 2 img.
Help me.
-
21 Jun 2007 8:34 AM #19
-
24 Jun 2007 11:09 PM #20
I fixed the link. I think I need a separate Ext playground

Br
Wolfgang


Reply With Quote