| Re: how do is sort select boxes alphabetically in profile module ? |
| by sarahmx on 2017/3/10 15:05:57 Thank you trabis..its working |
| Re: how do is sort select boxes alphabetically in profile module ? |
| by trabis on 2017/3/9 10:50:57 Try le="color: #000000"><?php case 'select': asort($options);
|
| Re: how do is sort select boxes alphabetically in profile module ? |
| by sarahmx on 2017/3/8 11:37:08 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 ? |
| Re: how do is sort select boxes alphabetically in profile module ? |
| by sarahmx on 2017/3/8 3:09:50 Bumping 6 year old thread ![]() anyone ? How do i sort the select box created using the profile module |
| how do is sort select boxes alphabetically in profile module ? |
| by sarahmx on 2012/11/6 23:55:00 is this possible how ? |