-
17 Apr 2007 2:30 PM #1
Ext.Form spanning multiple tabs
Ext.Form spanning multiple tabs
I'm trying to have a form with multiple elements spanning multiple tabs so therefore the submit button will submit the form with data from all the fields in the other tabs. Any ideas how to do that.
-
17 Apr 2007 3:12 PM #2
Search is your friend

See this http://extjs.com/forum/showthread.ph...iple+tabs+form and this http://extjs.com/forum/showthread.ph...iple+tabs+formTim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
17 Apr 2007 6:24 PM #3
Yes but I'm trying to use the Ext.Form class laid out in multiple tabs
-
17 Apr 2007 6:30 PM #4
I think you have the same issues with regard to how the form is laid out in relation to the tab containers.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
22 Apr 2007 9:06 AM #5
Neither of those threads deal with Ext.form forms.
I found this statement that jack made about 2 weeks ago...
Im guessing that this is still an accurate statement.1. There is no built in way to span a form across tabs currently. However, because of the plug-in nature of the form layouts, I'm sure it won't be long before one pops up. For a normal form in a dialog, you would render to the dialog's body.
-
23 Apr 2007 6:27 AM #6
Ok, im looking for a way to do this too. Is there anyone who has already managed to do this? Pls help us out!!
-
24 Apr 2007 3:55 AM #7
I'm currently running into this also, I really need to get a solution for this and I'm trying to get something working right now. Once it get it working I'll post my results in here.
-
25 Apr 2007 1:37 AM #8
Ok,
I got it to work (using some help from Jack
). The trick is this:
in your form definition, specify: autoCreate: false.
Then for each container in your form that you want to appear on a new tab, specify an element in its config, as in:
Then when creating a dialog, loop through all the (top-level) form containers and for each container do: c.getEl() and use this as the contentPanel (=tab) container element.Code:var c = form.container({el:Ext.DomHelper.append(document.body, {tag:'div'}), title: 'Personal info'}, ...
Now, to get all this to work properly, make sure that your dialog is autocreated as a form tag, so in the dialog config:
Then one final override is required! To make sure that the form.getValues() method works, you must override the form.render() method and replace theCode:autoCreate: {tag: 'form', method:'POST', onSubmit:false},
this.initEl(..) with:
That's it folks!Code:this.initEl(this.autoCreate !== false ? ct.createChild(o) : ct);
Cheers,
Seldon
-
27 Apr 2007 8:17 AM #9
I have a BorderLayout with a form inside the center content panel. I want to use tabs in this form. I tried a version of your method and everything appears to work accept the tabpanel doesn't respond to the click event (can't activate other tabs). I can activate using javascript.
My HTML markup
I created the form container as a child of the form element, because document.body wasn't working.Code:<div id="center" class="x-layout-inactive-content"> <form id="center_form" class="x-box-mc"> <div id="tabpanel"></div> </form> </div>
Then I rendered to the form element.Code:tabs[0] = form.container({el:Ext.DomHelper.append(Ext.get('center_form'), {tag:'div'}), title: 'Personal info'});
Code:form.render('center_form'); var tPanel=new Ext.TabPanel('tabpanel'); tPanel.addTab(tabs[0].getEl(),"Personal");
-
27 Apr 2007 8:59 AM #10


Reply With Quote



