Play Framework 2.0 multiple checkboxes in JAVA via GET
checkbox, playframework, playframework-2.0
Solution
Have a look at http://www.playframework.org/documentation/2.0/ScalaForms , section "Repeated Values":
1) Name the fields `type[0]`, `type[1]`, ....
2) You'll then have in the controller a List[String], out of which you have to look for the checked values.
Problem
How do you handle multiple checkboxes in Play Framework 2.0 JAVA via GET? The url looks similar to: `http://localhost:9000/games?type=platform&type=role`. How can I get both "type" values in a "Set" variable in my controller? My form looks like this: ``` <input type="checkbox" name="type[]" class="" value="all-types"> <input type="checkbox" name="type[]" class="" value="platform"> <input type="checkbox" name="type[]" class="" value="role"> ``` Thank you!