Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 7 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

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

Resized Image

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 ?

Who's Online

73 user(s) are online (45 user(s) are browsing Support Forums)


Members: 0


Guests: 73


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits