Sochettra / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Checkbox post array #296

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by caduch...@gmail.com on 7 Mar 2012 at 3:08

GoogleCodeExporter commented 8 years ago
does this work for you?
http://stackoverflow.com/questions/7343754/issue-in-dynatree-embed-in-forms-exam
ple

Original comment by moo...@wwwendt.de on 18 Mar 2012 at 11:23

GoogleCodeExporter commented 8 years ago
Deferred, so v1.2.1 can be released shortly.

Original comment by moo...@wwwendt.de on 6 Jun 2012 at 7:47

GoogleCodeExporter commented 8 years ago
I assume the proposed solution works
http://stackoverflow.com/a/7370310/19166

Original comment by moo...@wwwendt.de on 3 Oct 2012 at 7:31