options for the checkbox field
*
*/
$class = $vars['class'];
if (!$class) {
$class = "input_checkboxes";
}
foreach($vars['options'] as $label => $option) {
//if (!in_array($option,$vars['value'])) {
if (is_array($vars['value'])) {
$valarray = $vars['value'];
$valarray = array_map('strtolower', $valarray);
if (!in_array(strtolower($option),$valarray)) {
$selected = "";
} else {
$selected = "checked = \"checked\"";
}
} else {
if (strtolower($option) != strtolower($vars['value'])) {
$selected = "";
} else {
$selected = "checked = \"checked\"";
}
}
$labelint = (int) $label;
if ("{$label}" == "{$labelint}") {
$label = $option;
}
if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\"";
$disabled = "";
if ($vars['disabled']) $disabled = ' disabled="yes" ';
echo "
";
}