Help with a form

  • I am trying to create a Form Panel that consists of a Tab Panel. Under each tab I would then like to create individual forms. I have tried it with the code listed below, and the main form and the tab panel show up, but for some reason the forms attached to each tab do not show. Is my code wrong or is what I am trying to do not possible? The form itself is rendered to a main tab panel.


    var form = new Ext.FormPanel({
    frame:true,
    title: 'Patient Registration : New Patient',
    bodyStyle:'padding:5px 5px 0',
    name:'patinfotmp',
    defaultType: 'textfield',
    labelAlign: "right",
    width:700,
    height:500,
    renderTo: 'patient2',
    items: [{
    xtype: 'tabpanel',
    activeTab : 0,
    layoutOnTabChange : true,
    items : [
    {
    xtype : 'form',
    title : 'form1',
    defaultType : 'textfield',
    items : [
    {
    fieldLabel : 'TextField 1',
    name : 'textfield1'
    },
    {
    fieldLabel : 'TextField 2',
    name : 'textfield2'
    }
    ]
    },

    {
    xtype : 'form',
    title : 'form2',
    defaultType : 'textfield',
    items : [
    {
    fieldLabel : 'TextField 3',
    name : 'textfield3'
    },
    {
    fieldLabel : 'TextField 3',
    name : 'textfield3'
    }
    ]
    }

    ]
    }]
    });


    form.show();


  • Not allowed to nest forms. See http://www.w3.org/MarkUp/html3/forms.html


  • Are you wanting to create actual individual forms in the dom, or do you just want a single form that consists of several tabs? In order to get the form 'look' you dont need to use a formPanel for each tab, just a form layout.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Help with a form , Please add it free.