I’m sure I’m doing something daft but I can’t get my form to serialise multiple checkboxes in the way I want.
I’ve created a jsfiddle here
If you run, click populate form, tick a couple of boxes, then click serialise you get
an alert of multi%5B%5D=1&multi%5B%5D=2
when what I’m looking for is something more like multi=1,2
What am I doing wrong?
OK I was being daft. Thought serialise created an array from checkbox values but turns out php does that on the server side when the checkboxes contain [] in the name attribute.