Table of Contents

IT:AD:JQuery:Libs:SerializeForm

Summary

Notes

ie, instead of serializing the checkbox and the hidden field that MVC puts in there (with the same name) as:

MyCheckBox=true&MyChecBox=false 

it comes out as:

[MyCheckBox:true,false]

This in turn gets serializes as a form post:

MyCheckBox:true,false

which causes MVC to fail deserialzing it back to the original Model bool property, and so all checkboxes remain false… Not good.

For JSON

Note that

$('#formid').serializeArray();

returns a Map. Move towards JSON.stringify

Future