restextjsform-postformpanel

How can I get a FormPanel to POST JSON with ExtJS 3.1.0?


By default, a FormPanel in ExtJS 3.1.0 posts the form fields as application/x-www-form-urlencoded when you call its submit() function.

Is there any way to get it to post JSON instead?


Solution

  • You can use getValues() to pull the values and then Ext.encode() them and manually do an Ext.Ajax.request({}) with this data as well.