PDA

View Full Version : Form submit using jsonData



cl4ncy
20 Jul 2010, 9:02 AM
Hi,

Is it possible to post all form values as a json object using the jsonData attribute of Ajax.request?

I've looked through the source code and can't find anywhere I can add this simply. If I provide jsonData to the form.submit action can the form values be easily applied to this?

For example:



form.submit({

url: 'form.aspx/save',
jsonData: {
record: 101
},
...

});


I would then want the post to look like this:



{
recordID: 101,
name: 'John Smith',
email: '[email protected]'
}