|
|
$vraag['id'].'-'.$subgroep['id'],
'value' => $vraag['score']
);
if (isset($scores[$subgroep['id']][$vraag['id']]['score']) && $scores[$subgroep['id']][$vraag['id']]['score'] == $vraag['score']) {
$checkbox['checked'] = TRUE;
} else {
$checkbox['checked'] = FALSE;
}
echo form_checkbox($checkbox);
} elseif ($vraag['antwoord'] == 1) {
$dropdown = array();
for ($i=0; $i <= $vraag['score']; $i++) {
$dropdown[$i] = $i;
}
if (isset($scores[$subgroep['id']][$vraag['id']]['score'])) {
$select=$scores[$subgroep['id']][$vraag['id']]['score'];
} else {
$select=0;
}
echo form_dropdown($vraag['id'].'-'.$subgroep['id'], $dropdown, $select);
} elseif ($vraag['antwoord'] == 2) {
if (isset($scores[$subgroep['id']][$vraag['id']]['score'])) {
$select=$scores[$subgroep['id']][$vraag['id']]['score'];
} else {
$select="0.00";
}
$inputsetting = array(
'name' => $vraag['id'].'-'.$subgroep['id'],
'value' => $select,
'maxlength' => '4',
'size' => '4'
);
echo form_input($inputsetting);
}
?>
|