form_element helper now supports empty labels
This commit is contained in:
parent
20d4b1b1c3
commit
b97154d19e
|
@ -232,8 +232,12 @@ 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>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rendert ein Formular
|
||||
|
|
Loading…
Reference in New Issue