I totally screwd my code and application logic by forgetting that .serialize() only gives me checked elements (checkboxes) of my form. I really need ALL elements because i have to recreate small arrays with the elements in the right order.
Let’s say i have 10 checkboxes with the id/names box1 to box10 – now only checkbox 4 and 6 are checked therefore the output is:
…&box4=on&box6=on… but I also need &box1=(whatever just unlike “on” so i can differ) and the other 8 boxes :/.
I shoudld also mention that i have input type textfields and textareas – so it’s a mixed thingy. I don’t have only checkboxes.
Any ideas?
regards
don’t use .serialize(). iterate over all the checks and create the query string yourself.
mixed solution:
or something like that