It's pretty awkward that I couldn't find a thread with a similar problem... Well then, let's assume I have a standard HTML form with checkboxes (that will be parsed as an array in PHP), notice the brackets in the name attribute:
<form class="myForm" action="evaluate.php" method="get">
<input type="text" name="name" value="" placeholder="Your name"/>
<input type="checkbox" name="facts[]" value="1" id="fact-1"/><label for="fact-1">Fact 1</label>
<input type="checkbox" name="facts[]" value="2" id="fact-2"/><label for="fact-2">Fact 2</label>
...
</form>
And now I want jQuery to serialize the content of the form with:
alert($('.myForm').serialize());
The expected result would be something like this:
name=MyName&facts[]=1&facts=[]=2&...
but unfortunately it doesn't, because the brackets "[]" are escaped:
name=MyName&facts%5B%5D=1&facts=%5B%5D=2&...
Has anyone a solution for this problem except writing an own serialization script?