diff --git a/forms/DropdownField.php b/forms/DropdownField.php index 681792405..d7e369c24 100755 --- a/forms/DropdownField.php +++ b/forms/DropdownField.php @@ -30,26 +30,36 @@ class DropdownField extends FormField { } /** - * Returns a tag containing all the appropriate "; + + $options .= $this->createTag('option', array( + 'selected' => $selected, + 'value' => $value + ), $title); } - $id = $this->id(); - $disabled = $this->disabled ? " disabled=\"disabled\"" : ""; + $attributes = array( + 'class' => trim($this->extraClass()) ? $this->extraClass() : null, + 'id' => $this->id(), + 'name' => $this->name, + 'disabled' => $this->disabled ? 'disabled' : null, + 'tabindex' => $this->getTabIndex() + ); - return ""; + return $this->createTag('select', $attributes, $options); } function isSelected(){