- function setChecked($value) { $this->mChecked = $value; }
- function isChecked() { return $this->mChecked; }
-
- function setData($value) { $this->mOptions = $value; }
- function getData() { return $this->mOptions; }
-
- function toStringControl() {
- if (!$this->isRenderable()) return "";
-
- if ($this->id=="") $this->id = $this->name;
-
- $html = "\n\t<input type=\"checkbox\"";
- $html .= " name=\"$this->name\" id=\"$this->id\"";
-
- if ($this->mTabindex!="")
- $html .= " tabindex=\"$this->mTabindex\"";
-
- if ($this->mOnChange!="")
- $html .= " onchange=\"$this->mOnChange\"";
+ function getHtml() {
+ if ($this->id == '') $this->id = $this->name;
+
+ $html = "\n\t<input type=\"checkbox\"";
+ $html.= " id=\"$this->id\" name=\"$this->name\"";
+
+ if ($this->value)
+ $html.= " checked=\"true\"";
+
+ if ($this->on_change!="")
+ $html .= " onchange=\"$this->on_change\"";