diff --git a/form.php b/form.php index 7118a87..80db50f 100644 --- a/form.php +++ b/form.php @@ -477,18 +477,22 @@ class formfield } else { - if (isset ($this->values[$key]) && - $this->values[$key] !== null && - $this->values[$key] !== false && - $this->values[$key] !== "unset" && - $this->values[$key] !== "") - $res .= " checked='checked'"; - elseif (isset ($this->defaults[$key]) && - $this->defaults[$key] !== null && - $this->defaults[$key] !== false && - $this->defaults[$key] !== "unset" && - $this->defaults[$key] !== "") - $res .= " checked='checked'"; + if (isset ($this->values[$key])) + { + if ($this->values[$key] !== null && + $this->values[$key] !== false && + $this->values[$key] !== "unset" && + $this->values[$key] !== "") + $res .= " Checked='checked'"; + } + elseif (isset ($this->defaults[$key])) + { + if ($this->defaults[$key] !== null && + $this->defaults[$key] !== false && + $this->defaults[$key] !== "unset" && + $this->defaults[$key] !== "") + $res .= " cheked='checked'"; + } } if (isset ($this->hidden) && $this->hidden !== FALSE) $res .= " style='display:none'";