118 foreach ($this->options as $val =>
$name) {
119 $value[$encode ? htmlspecialchars($val, ENT_QUOTES) : $val] = ($encode > 1)
120 ? htmlspecialchars(
$name, ENT_QUOTES) :
$name;
132 if ($this->
inline ==
true) {
149 if (!is_array($ele_value)) {
150 $ele_value = (array) $ele_value;
156 if (count($ele_options) > 1 && substr($ele_name, -2, 2) !=
'[]') {
157 $ele_name = $ele_name .
'[]';
170 if (!empty($ele_value) && in_array(
$value, $ele_value)) {
176 $ret .=
'<label class="checkbox' . $this->
getInline() .
'">' . NWLINE;
178 $ret .=
$name . NWLINE;
179 $ret .=
"</label>" . NWLINE;
195 if (!empty($this->customValidationCode)) {
196 return implode(NWLINE, $this->customValidationCode);
201 $eltmsg = empty($eltcaption)
204 $eltmsg = str_replace(
'"',
'\"', stripslashes($eltmsg));
205 return NWLINE .
"var hasChecked = false; var checkBox = myform.elements['{$eltname}']; if (checkBox.length) {for (var i = 0; i < checkBox.length; i++) {if (checkBox[i].checked == true) {hasChecked = true; break;}}}else{if (checkBox.checked == true) {hasChecked = true;}}if (!hasChecked) {window.alert(\"{$eltmsg}\");if (checkBox.length) {checkBox[0].focus();}else{checkBox.focus();}return false;}";
setAttribute($name, $value=null)