function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JanixJanix 

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.

 

 

TomSnyderTomSnyder

assign as list/array type. 

Ex.

 

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

 

 

JanixJanix

I get the following error

 

Illegal assignment from String to LIST<String>