I'm working on an app with the following inputs:
<input type="checkbox" name="types[]" value="activities" checked />
<input type="checkbox" name="types[]" value="games" />
<input type="checkbox" name="types[]" value="apps" />
<input type="checkbox" name="types[]" value="videos" checked />
I'm using { hash: true, empty: true } so that I can serialize down an empty types field. However the inputs that aren't checked are showing up in the serialized parameters like:
{
"types": ["", "activities", "", "videos" ]
}
I would like:
{
"types": ["activities", "videos" ]
}
and the following when no inputs are checked:
What do you think about stripping out unchecked boxes if the name field includes no index?