46
rated 0 times
[
50]
[
4]
/ answers: 1 / hits: 22308
/ 12 Years ago, sat, may 12, 2012, 12:00:00
I'm using Twitter's bootstrap and need to pass a delimited list of checkbox selections to my server for processing. The checkbox HTML looks like this:
<div class=controls>
<label class=checkbox><input type=checkbox name=my_match[] value=190>TEST 190</label>
<label class=checkbox><input type=checkbox name=my_match[] value=200>TEST 200</label>
<label class=checkbox><input type=checkbox name=my_match[] value=210>TEST 210</label>
</div>
...
$.post(form.php, $(#form_id).serialize(), function(){
...
});
I'm passing the form values as a serialized string using jquery but the values are being sent like so:
my_match=190&my_match=200
Is it possible to send them in the following format?
my_match=190:200
I'm not sure if I need to change my HTML or this is something I need to handle with javascript. Any thoughts?
More From » jquery