src/Easy/Element/Checkbox.php
public function render()
    {
        $boolValue = $this->getSelectFrom();
        $disabledStr = ($this->getEnabled() == "N") ? "DISABLED=\"true\"" : "";

        if (strtoupper($this->getDefaultChecked()) == 'Y' && !isset($_GET['F'])) {
            $checkedStr = "CHECKED";
        } else {
            $checkedStr = ($boolValue == $this->getValue()) ? "CHECKED" : "";
        }
        $defaultValue = $this->defaultValue;
        $style = $this->getStyle();
        $text = $this->getText();
        $func = $this->getFunction();
        $sHTML = '';
        $fromList = array();
        $this->getFromList($fromList);

        if (count($fromList) > 1) {
            $valueArr = explode(',', $this->getValue());

            foreach ($fromList as $opt) {
                $test = array_search($opt['val'], $valueArr);
                if ($test === false) {
                    $checkedStr = '';
                } else {
                    $checkedStr = "CHECKED";
                }
                $sHTML .= "<INPUT TYPE=CHECKBOX NAME='" . $this->objectName . "[]' ID=\"" . $this->objectName . "\" DefaultValue=\"$defaultValue\" VALUE=\"" . $opt['val'] . "\" $checkedStr $disabledStr $this->htmlAttr $func /> " . $opt['txt'] . "";
            }
        } else {
            $sHTML = "<INPUT TYPE=\"CHECKBOX\" NAME=\"" . $this->objectName . "\" ID=\"" . $this->objectName . "\" DefaultValue=\"$DefaultValue\" VALUE='$boolValue' $checkedStr $disabledStr $this->htmlAttr $style $func /> " . $text . "";
        }

        return $sHTML;
    }
public function render()
    {
        $boolValue = $this->getSelectFrom();
        $disabledStr = ($this->getEnabled() == "N") ? "DISABLED=\"true\"" : "";

        if (strtoupper($this->getDefaultChecked()) == 'Y' && !isset($_GET['F'])) {
            $checkedStr = "CHECKED";
        } else {
            $checkedStr = ($boolValue == $this->getValue()) ? "CHECKED" : "";
        }
        $defaultValue = $this->defaultValue;
        $style = $this->getStyle();
        $text = $this->getText();
        $func = $this->getFunction();
        $sHTML = '';
        $fromList = array();
        $this->getFromList($fromList);

        if (count($fromList) > 1) {
            $valueArr = explode(',', $this->getValue());

            foreach ($fromList as $opt) {
                $test = array_search($opt['val'], $valueArr);
                if ($test === false) {
                    $checkedStr = '';
                } else {
                    $checkedStr = "CHECKED";
                }
                $sHTML .= "<INPUT TYPE=CHECKBOX NAME='" . $this->objectName . "[]' ID=\"" . $this->objectName . "\" DefaultValue=\"$defaultValue\" VALUE=\"" . $opt['val'] . "\" $checkedStr $disabledStr $this->htmlAttr $func /> " . $opt['txt'] . "";
            }
        } else {
            $sHTML = "<INPUT TYPE=\"CHECKBOX\" NAME=\"" . $this->objectName . "\" ID=\"" . $this->objectName . "\" DefaultValue=\"$DefaultValue\" VALUE='$boolValue' $checkedStr $disabledStr $this->htmlAttr $style $func /> " . $text . "";
        }

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

@return string HTML text