3
i saw this code in modules/profile/class/field.php
le="color: #000000"><?php case 'select': $element = new XoopsFormSelect($caption, $name, $value); // If options do not include an empty element, then add a blank option to prevent any default selection // if (!in_array('', array_keys($options))) { if (!array_key_exists('', $options)) { $element->addOption('', _NONE); $eltmsg = empty($caption) ? sprintf(_FORM_ENTER, $name) : sprintf(_FORM_ENTER, $caption); $eltmsg = str_replace('"', '"', stripslashes($eltmsg)); $element->customValidationCode[] = "nvar hasSelected = false; var selectBox = myform.{$name};" . "for (i = 0; i < selectBox.options.length; i++) { if (selectBox.options[i].selected == true && selectBox.options[i].value != '') { hasSelected = true; break; } }" . "if (!hasSelected) { window.alert("{$eltmsg}"); selectBox.focus(); return false; }"; } $element->addOptionArray($options); break;
what do i need to change ?