class = 'Checkbox'; $this->name = $name; } function getHtml() { if ($this->id == '') $this->id = $this->name; $html = "\n\tid\" name=\"$this->name\""; if ($this->value) $html.= " checked=\"true\""; if ($this->on_change!="") $html .= " onchange=\"$this->on_change\""; if ($this->style!="") $html .= " style=\"$this->style\""; if (!$this->isEnabled()) $html .= " disabled=\"disabled\""; // Provide a value so that we pass "1" for set checkboxes on form submit. // Otherwise the default is "on" string, which is not what we want. $html .= " value=\"1\""; $html .= "/>\n"; return $html; } }