| Issue 296: | Checkbox post array | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. create checkbox tree
2. serializArray
3. and post
all keys/objects in the array are given the same name (as the tree), so when you get to process it through a form post, you only ever get the last value.
I'm no real coder, so excuse my lame-0 definitions, but I "fixed" it by changing a line in the serializeArray function in the dynatree.js...
From:
arr.push({name: name, value: nodeList[i].data.key});
To:
arr.push({name: name+"[]", value: nodeList[i].data.key});
that makes the return a real array. which is what I needed and figured what something called serializeArray should return.
I could be wrong of course, but it works a treat for me.
Jun 6, 2012
Deferred, so v1.2.1 can be released shortly.
Labels:
-Milestone-Release1.2.1 Milestone-Release1.2.2
Oct 3, 2012
I assume the proposed solution works http://stackoverflow.com/a/7370310/19166
Status:
Done
|
Labels: Milestone-Release1.2.1