[HTMLUtils] Fix form input attribute assignment

- Don't assign attributes to all options of a selection
- Assign attributes to checkboxes
This commit is contained in:
logmanoriginal 2016-08-15 02:32:36 +02:00
parent 3ca2f030e7
commit 3fd283e29f

View file

@ -96,12 +96,12 @@ CARD;
$card .= '<select ' . $additionalInfoString . ' id="' . $idArg . '" name="' . $inputEntry['identifier'] . '" >';
foreach($inputEntry['values'] as $listValues) {
$card .= '<option ' . $additionalInfoString . ' value="' . $listValues['value'] . '">' . $listValues['name'] . '</option>';
$card .= '<option value="' . $listValues['value'] . '">' . $listValues['name'] . '</option>';
}
$card .= '</select><br >';
} else if($inputEntry['type'] == 'checkbox') {
$card .= '<input id="' . $idArg . '" type="checkbox" name="' . $inputEntry['identifier'] . '" /><br />' . PHP_EOL;
$card .= '<input ' . $additionalInfoString . ' id="' . $idArg . '" type="checkbox" name="' . $inputEntry['identifier'] . '" /><br />' . PHP_EOL;
}
}