form_element helper now supports empty labels

main
Felix Favre 10 years ago
parent 20d4b1b1c3
commit b97154d19e

@ -232,7 +232,11 @@ function form_select($name, $label, $values, $selected) {
* Rendert ein Formular-Element
*/
function form_element($label, $input, $for = "") {
if ($label == '') {
return '<div class="form-group">' . $input . '</div>';
}else {
return '<div class="form-group">' . '<label for="' . $for . '">' . $label . '</label>' . $input . '</div>';
}
}
/**

Loading…
Cancel
Save