PDA

View Full Version : Is there anything that will override the submit method of form panel ?



Manoj Parida
18 Sep 2012, 3:02 AM
Hi,
I want to override submit method of Ext.form.Panel while click on login button in form, for adding extra field in response.

If possible,give some idea.


Thanks in Advance.


Regards
Manoj Parida

sword-it
18 Sep 2012, 3:31 AM
Hi,

check this link : http://www.sencha.com/forum/showthread.php?183656-Override-submit-function-in-FormPanel-fails

Manoj Parida
18 Sep 2012, 4:03 AM
Hi,
I gone through this link,as this link tells that

There isn't anything there that will override the submit method.

Is it acceptable or we may override ?

Any suggestions!!!!


Regards
Manoj Parida

mitchellsimoens
19 Sep 2012, 12:35 PM
In that thread I said that there isn't anything there that will override the submit method meaning there wasn't anything int he code they provided that will override the submit method.

If you want to add an additional field to what is sent you can do it many ways.


form.submit({
params : {
foo : 'bar'
}
});

or listen to beforesubmit and add it in there, I prefer the first way ^^

Manoj Parida
20 Sep 2012, 9:58 AM
Thanks for suggestion,as {"id":"123456"} is my response coming while click on submit button,it is coming because it has no success:"true" field and failure function is execute.


After getting this response i want to add success:"true" in response as a field,so when i click submit button,success function will execute other than failure.

Please give some tips.


Regards
Manoj Parida