i have a form created by this code
foreach ($options as $i=>$option)
{
echo CHtml::activeCheckBox($option,"[$i]optionid",array('checked'=>false,'value'=>$option->optionid));
}
controller code is
...
foreach($options as $i=>$option)
{
if(isset($_POST['Optionmodel'][$i]))
{
$option->attributes=$_POST['Optionmodel'][$i];
...
when in controller i check $option->attributes[‘optionid’] i see all checkboxes (selected and no-selected checkbox)
is this natural?
how to get only selected checkbox in controller or how to detect selected checkbox?