PDA

View Full Version : form with 2 fieldsets in a column



Stephan123
29 Oct 2009, 6:22 AM
Hello !

I will build a form with 2 columns.
In the first column 2 Fieldset with elements are to be inserted.
How can help ?


macheFenster: new Ext.Window({
title: 'Benutzerdaten',
modal: true,
width: 800,
autoHeight: true,
renderTo: document.body,
draggable: false,
resizable: false,

defaults: {
border: 'false',
bodyStyle: 'padding: 5px;',
frame: false
},

x: 50,
y: 100,
id: 'fenster',


items: [{
xtype: 'form',
id: 'formular',
layout: 'column',
defaults: {
bodyStyle: 'padding: 10px;'
},

items: [{
columnWidth: .5,
xtype: 'fieldset',
title: '  Information  ',
layout: 'form',
id: 'abschnitt1',
items: [{
xtype : "textfield",
name : "id",
fieldLabel : "ID",
width : 50,
readOnly: true
}


// Here the next fieldset !!!!!!
{
xtype: 'textfield',
fieldLabel: 'Name',
name: 'name',
width: 170,
readOnly: true
}]
},{
columnWidth: .5,
xtype: 'fieldset',
title: '  Kommunikation  ',
layout: 'form',
id: 'abschnitt2',
items: [{
xtype: 'textfield',
fieldLabel: 'E-Mail *',
name: 'email',
width: 170,
msgTarget : "qtip",
qtip : "Bitte E-Mailadresse eingeben",
allowBlank : false
},{
xtype: 'textfield',
fieldLabel: 'Telefon *',
name: 'telefon',
width: 170,
msgTarget : "qtip",
qtip : "Bitte Telefonnummer eingeben",
allowBlank : false
}]
}]

}]

}), // Ende FensterYour sincerly

Stephan

29 Oct 2009, 10:15 AM
stephan,

I would not set an instance of Ext.window to a property of a class's prototype.

29 Oct 2009, 10:24 AM
the following works fine:


new Ext.Window({
title: 'Benutzerdaten',
modal: true,
width: 800,
height : 150,
renderTo: document.body,
draggable: false,
resizable: false,
layout : 'fit',
defaults: {
border: 'false',
bodyStyle: 'padding: 5px;',
frame: false
},
x: 50,
y: 100,
id: 'fenster',
items: [{
xtype: 'form',
id: 'formular',
layout: 'column',
defaults: {
bodyStyle: 'padding: 10px;'
},
items: [{
columnWidth: .5,
xtype: 'fieldset',
title: '  Information  ',
layout: 'form',
id: 'abschnitt1',
items: [{
xtype: "textfield",
name: "id",
fieldLabel: "ID",
width: 50,
readOnly: true
},
// Here the next fieldset !!!!!!
{
xtype: 'textfield',
fieldLabel: 'Name',
name: 'name',
width: 170,
readOnly: true
}]
},
{
columnWidth: .5,
xtype: 'fieldset',
title: '  Kommunikation  ',
layout: 'form',
id: 'abschnitt2',
items: [{
xtype: 'textfield',
fieldLabel: 'E-Mail *',
name: 'email',
width: 170,
msgTarget: "qtip",
qtip: "Bitte E-Mailadresse eingeben",
allowBlank: false
},
{
xtype: 'textfield',
fieldLabel: 'Telefon *',
name: 'telefon',
width: 170,
msgTarget: "qtip",
qtip: "Bitte Telefonnummer eingeben",
allowBlank: false
}]
}]
}]
}).show()

Animal
30 Oct 2009, 12:28 AM
Do you have a question?