options as $key => $val) { $attributes = $this->getAttributeString($val); $field .= sprintf('' . '' , $name, $key, Useful::slugify($name) . '_' . Useful::slugify($key), (is_array($value) && in_array((string) $key, $value) ? 'checked="checked"' : '') . $attributes['string'], $attributes['val'], $form_name); } $class = !empty($this->error) ? 'error choice_label' : 'choice_label'; return array( 'messages' => !empty($this->custom_error) && !empty($this->error) ? $this->custom_error : $this->error, 'label' => $this->label == false ? false : sprintf('', $class, $this->label), 'field' => $field, 'html' => $this->html ); } }