+ Start a Discussion

Checkbox values with getParameters

I have an external form posting to a Sites page.  The external form has checkboxes with the same name and different values e.g.,


<input type="checkbox" name="vehicle" value="Bike" />
<input type="checkbox" name="vehicle" value="Car" />


I obtain the  value of vehicle through ApexPages.currentPage().getParameters().get('vehicle').  However, if both boxes are checked, I only get the first value.  Is there anyway to retrieve both values?  JavaScript on the Sites page is not an option because I am using POST not GET.




assign as list/array type. 



LIST<String> vehicle = ApexPages.currentPage().getParameters().get('vehic le').




I get the following error


Illegal assignment from String to LIST<String>