[Solved] Checkbox only in params if checked
Posted: Tue Dec 30, 2008 9:41 pm
I'm creating a checkbox and assigning it to a smarty variable, outputted by a template.
$s = $this->CreateInputCheckbox($id,'mycheckbox' ,'1', $checkboxvalue );
$smarty->assign('input_mycheckbox',$s);
The checkbox is on the form, but only if the checkbox is checked, does it get returned in the $params array when the form is submitted.
Using the php:
print_r($params);
I don't get mycheckbox => anything if not checked.
It is not in the list of $params elements, there is no $params['mycheckbox']
Am I doing something wrong?
$s = $this->CreateInputCheckbox($id,'mycheckbox' ,'1', $checkboxvalue );
$smarty->assign('input_mycheckbox',$s);
The checkbox is on the form, but only if the checkbox is checked, does it get returned in the $params array when the form is submitted.
Using the php:
print_r($params);
I don't get mycheckbox => anything if not checked.
It is not in the list of $params elements, there is no $params['mycheckbox']
Am I doing something wrong?