public function getAttributes($arrStrip = array()) { // The "required" attribute only makes sense for single checkboxes if (count($this->arrOptions) == 1 && $this->mandatory) { $this->arrAttributes['required'] = 'required'; } return parent::getAttributes($arrStrip); }