', $name, $form_name); foreach ($this->options as $key => $val) { $attributes = $this->getAttributeString($val); $field .= sprintf('', $key, (is_array($value) && in_array((string) $key, $value) ? 'selected="selected"' : '') . $attributes['string'], $attributes['val']); } $field .= ''; $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('', $form_name, $name, $class, $this->label), 'field' => $field, 'html' => $this->html ); } }