Skip to content
Snippets Groups Projects
Commit c87694b1 authored by Matthieu Guffroy's avatar Matthieu Guffroy
Browse files

repair BoolField

parent 37d39137
No related branches found
No related tags found
No related merge requests found
......@@ -5,13 +5,9 @@ class BoolField extends Field
public function html($form) {
if ($this->value) {$checked = "checked";} else {$checked = false;}
$html = '<div class = "checkbox">
<label for = "form'.$this->name.'">
<input type = "checkbox" name = "'.$this->name.'" value ="'.$this->value.'" '.$checked.'> '.ucfirst($this->name).'
</label>
</div>';
return $html;
if($this->value) { $checked="checked"; } else { $checked = false; }
$html = '<div class="checkbox"> <label> <input type="checkbox" name="'.$this->name.'" '.$checked.'>'.ucfirst($this->name).'</label> </div>';
return $html;
}
public function validate()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment