PDA

View Full Version : SUBMIT FORM NOT SEND EMPTY/NULL PARAMETER



4lenour
3 Mar 2013, 6:08 AM
Dear All

a few day i was search "HOW TO SUBMIT FORM SEND EMPTY/NULL PARAMETER" and i am try all suggestion from forum answer about this, but did'tn work.

i found this url http://www.sencha.com/forum/showthread.php?243350-SUBMIT-method-of-a-form-not-sent-null-parameters but did'tn work to, can any body to help me?

this is my code :



form.submit({
method:'POST',
submitEmptyText: true,
waitTitle:'Connecting',
waitMsg:'Please wait for sending data ...',
waitMsgTarget:true,
success: function(form, action) {
form.reset();
Ext.getCmp('dataGrid').getStore().load();
},
failure: function(form, action) {
switch (action.failureType) {
case Ext.form.action.Action.CLIENT_INVALID:
Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
break;
case Ext.form.action.Action.SERVER_INVALID:
Ext.Msg.alert('Failure', action.result.msg);
break;
default:
switch(action.response.status)
{
case 401:
window.document.location.href=ifoBaseURL;
break;
case 200:
Ext.Msg.alert('Failure', obj.msg);
break;
default:
Ext.Msg.alert(action.response.statusText, action.response.responseText);
}
}
}
});

mitchellsimoens
5 Mar 2013, 8:07 AM
This form sends the blank value:


new Ext.form.Panel({
renderTo : document.body,
title : 'Test',
url : 'data/form.php',
items : [
{
xtype : 'textfield',
fieldLabel : 'Foo',
name : 'foo',
value : 'bar'
},
{
xtype : 'textfield',
fieldLabel : 'Blank Value',
name : 'blank'
},
{
xtype : 'button',
text : 'Submit',
handler : function (button) {
var form = button.up('form');

form.submit();
}
}
]
});

4lenour
6 Mar 2013, 3:06 AM
mitchellsimoens your suggest not work to, i am using extjs 4.2 beta and i am create app using MVC extjs

mitchellsimoens
6 Mar 2013, 6:19 AM
Like I said, for me it sends the value:

42228

Tested on 4.1.3 and 4.2.0.489