PDA

View Full Version : Form Submit--Pass checkbox values as array?



JohnJones357
10 Apr 2014, 5:45 AM
I have multiple checkboxes with the same name but different inputValues. If multiple checkboxes are selected
theres a variable passed for each checkbox like so:

mycheckbox: inputValue1
mycheckbox: inputValue2
mycheckbox: inputValue3

how can i instead send mycheckbox: [inputValue1, inputValue2, inputValue3]

thanks!

Gary Schlosberg
10 Apr 2014, 9:13 AM
If you're using HTTP, it doesn't support anything but strings, so you'd have to 'flatten' it yourself and evaluate it on the server side.

ByteLess
25 Jul 2016, 2:48 AM
I have multiple checkboxes with the same name but different inputValues. If multiple checkboxes are selected
theres a variable passed for each checkbox like so:

mycheckbox: inputValue1
mycheckbox: inputValue2
mycheckbox: inputValue3

how can i instead send mycheckbox: [inputValue1, inputValue2, inputValue3]

thanks!
how did you fix this?