I have the below form input elements, each with the same name of “rating” as shown below.
<input type="checkbox" checked="checked" value="5" id="rating5_2053" name="rating">
<input type="checkbox" checked="checked" value="4" id="rating4_2053" name="rating">
<input type="checkbox" checked="checked" value="3" id="rating3_2053" name="rating">
<input type="checkbox" checked="checked" value="2" id="rating2_2053" name="rating">
<input type="checkbox" checked="checked" value="1" id="rating1_2053" name="rating">
<input type="checkbox" checked="checked" value="0" id="rating0_2053" name="rating">
When using
$form.serialize();
and submitting the form,
EDIT: Using JQuery Serialize() result and manipulating the querystring for the GET request, it ends up like the below:
&rating=5&rating=4&rating=3&rating=2&rating=1&rating=0
There is good reason for it to do this, but in my case I don’t need to do that.
I wanted to know if there is a way I can configure this to do the below instead?
&rating=5,4,3,2,1,0
Thanks
Here you go
http://jsfiddle.net/Ejf45/1/