alphadogg
16 Sep 2012, 10:40 AM
I have a form that, when I call submit() on it, seems to ignore the values in the form.
, handler: function() {
var frm = this.up('form').getForm();
if (frm.isValid()) {
var flds = frm.getValues();
// submit form
var gd = Ext.getCmp('addServiceForm_SrcGrid').getValue();
if( gd == 'expectedGrid' ){
frm.submit({
url: 'addExpectedService_single.asp'
, clientValidation: false
, standardSubmit: true
, success: function(form, action) {
Ext.Msg.alert('Success', action.result.message);
}
, failure: function(form, action) {
Ext.Msg.alert('Failed', action.result ? action.result.message : 'No response');
}
});
}
if( gd == 'originalGrid' ){
frm.submit({
url: 'addOriginalService_single.asp'
, standardSubmit: true
});
}
// reset form for next turn
this.up('form').getForm().reset();
this.up('window').hide();
}
}
On the receiving end, I see nothing. I do get a request, but the values are the emptyText value for some fields, others are blank. Weirdly, the flds object does contain the actual field values.
What?
, handler: function() {
var frm = this.up('form').getForm();
if (frm.isValid()) {
var flds = frm.getValues();
// submit form
var gd = Ext.getCmp('addServiceForm_SrcGrid').getValue();
if( gd == 'expectedGrid' ){
frm.submit({
url: 'addExpectedService_single.asp'
, clientValidation: false
, standardSubmit: true
, success: function(form, action) {
Ext.Msg.alert('Success', action.result.message);
}
, failure: function(form, action) {
Ext.Msg.alert('Failed', action.result ? action.result.message : 'No response');
}
});
}
if( gd == 'originalGrid' ){
frm.submit({
url: 'addOriginalService_single.asp'
, standardSubmit: true
});
}
// reset form for next turn
this.up('form').getForm().reset();
this.up('window').hide();
}
}
On the receiving end, I see nothing. I do get a request, but the values are the emptyText value for some fields, others are blank. Weirdly, the flds object does contain the actual field values.
What?