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

repair BoolField

parent c87694b1
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,13 @@ class BoolField extends Field
public function validate()
{
if (isset($_POST[$this->name]))
if ($_POST[$this->name] == 'on')
$this->value = true;
else
$this->value = false;
if (isset($_POST[$this->name]))
{
$this->value = true;
}
else {
$this->value = false;
}
return true;
}
}
......
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