For all those people looking for a way to submit a FormPanel the old fashioned way in ExtJS 2.0
Ext.onReady(function(){
Ext.QuickTips.init();
// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';
var login_form = new Ext.FormPanel({
id: login_form,
labelWidth: 75,
frame:true,
title: 'enterwhateveryouwant',
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
onSubmit: Ext.emptyFn,
submit: function() {
this.getForm().getEl().dom.action = 'enterthepageyouneed';
this.getForm().getEl().dom.submit();
},
defaultType: 'textfield',
items: [{
fieldLabel: 'Email',
name: 'email',
vtype:'email',
allowBlank:false
},{
fieldLabel: 'Password',
inputType:'password',
name: 'password',
allowBlank:false
},{
name: 'enterwhateveryouwant',
inputType:'hidden',
value: 'enterwhateveryouwant'
}
],buttons: [{
text: 'Login',
handler: submitForm
}]
});
function submitForm(){
login_form.submit();
}
login_form.render('login_form');
});
thanks to
jg4smile who posted the "important parts" of this first
