src/Easy/Element/EditCombobox.php
public function render()
    {
        $fromList = array();
        $this->getFromList($fromList);
        $valueArr = explode(',', $this->value);
        $disabledStr = ($this->getEnabled() == "N") ? "disabled=\"true\"" : "";
        $style = $this->getStyle();
        $func = $this->getFunction();
        $selName = $this->objectName . "_sel";
        //$onchange = "onchange=\"$('$inputName').value=this.value;".$this->onchange."\"";
        $onChange = "onchange=\"$('$this->objectName').value=this.value; $('$this->objectName').triggerEvent('change');\" $func";

        $sHTML = "<div $style>\n";
        $sHTML .= "<select name=\"" . $selName . "\" id=\"" . $selName . "\" $disabledStr $this->htmlAttr $onChange>\n";

        if ($this->blankOption) { // ADD a blank option
            $entry = explode(",", $this->blankOption);
            $text = $entry[0];
            $value = ($entry[1] != "") ? $entry[1] : null;
            $entryList = array(array("val" => $value, "txt" => $text));
            $fromList = array_merge($entryList, $fromList);
        }

        foreach ($fromList as $opt) {
            $test = array_search($opt['val'], $valueArr);
            if ($test === false) {
                $selectedStr = '';
            } else {
                $selectedStr = "selected";
                $selVal = $opt['val'];
            }
            $sHTML .= "<option value=\"" . $opt['val'] . "\" $selectedStr>" . $opt['txt'] . "</option>\n";
        }

        if (!$selVal)
            $selVal = $this->value ? $this->value : $this->getDefaultValue();

        $sHTML .= "</select>\n";
        $sHTML .= "<div><input id=\"$this->objectName\" name=\"$this->objectName\" type=\"text\" value=\"$selVal\" $func/></div>\n";
        $sHTML .= "</div>\n";

        return $sHTML;
    }
public function render()
    {
        $fromList = array();
        $this->getFromList($fromList);
        $valueArr = explode(',', $this->value);
        $disabledStr = ($this->getEnabled() == "N") ? "disabled=\"true\"" : "";
        $style = $this->getStyle();
        $func = $this->getFunction();
        $selName = $this->objectName . "_sel";
        //$onchange = "onchange=\"$('$inputName').value=this.value;".$this->onchange."\"";
        $onChange = "onchange=\"$('$this->objectName').value=this.value; $('$this->objectName').triggerEvent('change');\" $func";

        $sHTML = "<div $style>\n";
        $sHTML .= "<select name=\"" . $selName . "\" id=\"" . $selName . "\" $disabledStr $this->htmlAttr $onChange>\n";

        if ($this->blankOption) { // ADD a blank option
            $entry = explode(",", $this->blankOption);
            $text = $entry[0];
            $value = ($entry[1] != "") ? $entry[1] : null;
            $entryList = array(array("val" => $value, "txt" => $text));
            $fromList = array_merge($entryList, $fromList);
        }

        foreach ($fromList as $opt) {
            $test = array_search($opt['val'], $valueArr);
            if ($test === false) {
                $selectedStr = '';
            } else {
                $selectedStr = "selected";
                $selVal = $opt['val'];
            }
            $sHTML .= "<option value=\"" . $opt['val'] . "\" $selectedStr>" . $opt['txt'] . "</option>\n";
        }

        if (!$selVal)
            $selVal = $this->value ? $this->value : $this->getDefaultValue();

        $sHTML .= "</select>\n";
        $sHTML .= "<div><input id=\"$this->objectName\" name=\"$this->objectName\" type=\"text\" value=\"$selVal\" $func/></div>\n";
        $sHTML .= "</div>\n";

        return $sHTML;
    }
Render element, according to the mode

@return string HTML text