Ext.onReady(function(){
var simple = new Ext.form.FormPanel({
standardSubmit: true,
frame:true,

title: 'Formularz kontaktowy',
width: 610,
labelWidth: 155,
defaults: {width: 430},
buttonAlign: 'right',
// defaultType: 'textfield',
items: [

{ xtype: 'textfield', fieldLabel: 'imię nazwisko', name: 'Nazwisko', allowBlank:false },
{ xtype: 'textfield', fieldLabel: 'firma', name: 'Firma', allowBlank:true },
{ xtype: 'textfield', fieldLabel: 'adres', name: 'Adres:', allowBlank:false },
{ xtype: 'textfield', fieldLabel: 'telefon', name: 'Telefon:', allowBlank:false },
{ xtype: 'textfield', fieldLabel: 'e-mail', name: 'email', allowBlank:false },
{ xtype: 'textarea', fieldLabel: 'wiadomość', name: 'Wiadomosc', allowBlank:false},

{
inputType: 'hidden',
id: 'submitbutton',
name: 'myhiddenbutton',
value: 'hiddenvalue'
}

],
buttons: [{
text: 'Wyślij',
handler: function() {
simple.getForm().getEl().dom.action = 'form2mail.php';
simple.getForm().getEl().dom.method = 'POST';
simple.getForm().submit();
}
}]
});
simple.render('formularz7');
});
