I have a URL passing values from form checkboxes to a template. All the checkboxes are grouped with the same name=
attribute. When multiple checkboxes are selected, the query string looks something like:
?checkValue=12345&checkValue=23456&checkValue=34567
However, craft.request.getQuery('checkValue')
returns only the last value (34567 in this case).
How can I retrieve all the values so they can be used and manipulated?
EDIT: I've corrected the naming of the checkboxes from name="checkValue"
to name="checkValue[]"
, so now my query string looks like this:
?checkValue%5B%5D=12345&checkValue%5B%5D=23456&checkValue%5B%5D=34567
Does that change what can be accessed using craft.request.getQuery('checkValue')
?