Code:
Ext.onReady(function(){
Ext.QuickTips.init();
//Ext.form.Field.prototype.msgTarget = 'side';
var MyWebForm = new Ext.FormPanel( {
standardSubmit: true,
url: 'http://www.url.com/update.html',
frame: true,
//bodyStyle:'background-color: #fff; padding:5px 5px 0;',
width: 950,
fieldDefaults: {
msgTarget: 'side',
width: 550,
labelWidth: 200
},
defaults: {
anchor: '100%'
},
monitorValid: true,
defaultType: 'textfield',
items : [
{
xtype:'fieldset',
title: 'Allgemeine Angaben',
collapsible: true,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [
{
id: 'myGroup',
xtype: 'radiogroup',
fieldLabel: 'Art der Änderung',
columns: 1,
vertical: true,
items: [
{boxLabel: 'Korrektur', name: 'aa', inputValue: 'Update', checked: true},
{boxLabel: 'Neuer Content', name: 'aa', inputValue: 'New content'}
]
},
{
fieldLabel: 'Titel',
name: 'title',
allowBlank: false
},
{
fieldLabel: 'Rubrik',
name: 'topic',
allowBlank: false
},
{
fieldLabel: 'E-Mail Absender',
name: 'person',
allowBlank: false,
vtype: 'email'
//anchor: '50%'
},
{
fieldLabel: 'Gewünschtes Datum',
xtype: 'datefield',
name: 'date'
//anchor: '50%'
},
{
xtype: 'textareafield',
fieldLabel: 'Kommentare',
grow: true,
name: 'comments'
},
{
xtype: 'hiddenfield',
name: 'mydigest',
value: '<%$digest%>'
},
{
xtype: 'hiddenfield',
name: 'timestamp',
value: '<%$timestamp%>'
},
{
xtype: 'hiddenfield',
name: 'status',
value: 'new'
}
]
},
{
xtype:'fieldset',
title: 'Inhalte',
collapsible: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype:'tabpanel',
activeTab: 0,
// defaults:{
// bodyStyle:'padding:10px'
// },
items:[
{
title:'Deutsch',
layout: 'fit',
cls: 'x-plain',
items: [{
xtype: 'htmleditor',
height: 400,
anchor: '100%',
name: 'content_de'
}]
},
{
title:'Französisch',
layout: 'fit',
cls: 'x-plain',
items: [{
xtype: 'htmleditor',
anchor: '100%',
height: 400,
name: 'content_fr'
}]
},
{
title:'Italienisch',
layout: 'fit',
cls: 'x-plain',
items: [{
xtype: 'htmleditor',
anchor: '100%',
height: 400,
name: 'content_it'
}]
}
]
}]
},
{
xtype:'fieldset',
title: 'File Uploads',
collapsible: true,
layout: 'anchor',
defaults: {
anchor: '40%'
},
items: [
{
xtype: 'filefield',
fieldLabel: 'Upload 1',
name: 'upload1'
},
{
xtype: 'filefield',
fieldLabel: 'Upload 2',
name: 'upload2'
},
{
xtype: 'filefield',
fieldLabel: 'Upload 3',
name: 'upload3'
}
]
}
],
buttons: [
{
text: 'Senden',
id: 'mysubmit',
formBind: true,
handler: function() {
//MyWebForm.getForm().getEl().dom.action = 'http://xy.com';
//MyWebForm.getForm().getEl().dom.method = 'POST';
var form = this.up('form').getForm();
if (form.isValid()) {
form.submit();
}
}
}
]
});
MyWebForm.render('myform');
});
thanks for your help.