public function getHtml() { $this->unsetAttribute('checked'); if ($this->checked) { $this->setAttribute('checked', 'checked'); } return parent::getHtml(); }