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

Daniel T. picture Daniel T. · Feb 4, 2010 · Viewed 7.2k times · Source

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?

Answer

Lloyd picture Lloyd · Feb 4, 2010

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.