public function renderSelect(Daq_Form_Element $element) { $optionList = ""; foreach ($element->getOptions() as $option) { $opt = array(); $opt['value'] = $option['value']; if ($opt['value'] == $element->getValue()) { $opt['selected'] = "selected"; } elseif (isset($opt['selected'])) { unset($opt['selected']); } $opt['value'] = esc_html($opt['value']); $optionList .= $this->_render("option", $opt, $option['desc']); } $opt = array(); $opt['name'] = $element->getName(); $opt['id'] = $element->getName(); $opt['class'] = $element->getClasses(true); return $this->_render("select", $opt, $optionList); }