Are there any addon like "Sort Field Options" for XenForo 1.5?

Status
Not open for further replies.

Zhoumin

Member
Hi everyone,
I am working with Custom User Field on XenForo 1.5. The problem that I need to show many options in multi-select type field that the users can select several given options.
It seems that the options in Custom User Field XenForo 1.5 listed on the ID (increase) but not the entered value, so that which value is entered first will display first and then the others. As the result, the users will got difficulties to select right option in hundreds of given items as it is not displayed alphabetically.
Form should be as follow:

<select name="custom_fields_skills" id="ctrl_custom_field_skills" class="textCtrl" size="20" multiple="multiple">

<option value="A" selected="selected">A</option>

<option value="Z" selected="selected">Z</option>

<option value="M" selected="selected">M</option>

<option value="U" selected="selected">U</option>

<option value="A2" >A2</option>

<option value="N5" selected="selected">N5</option>

<option value="X" >X</option>

<option value="T" >T</option>

<option value="D" >D</option>

<option value="L" selected="selected">L</option>

</select>
In XenForo 2.x there is Addon "Sort Field Options". Are there any such addon available in XenForo 1.5? Or is there anyway to sort the options by name/value (not ID)?

PS: I use javascript to sort this value and it can be sorted perfectly. However, after sorting the value using javascript, the form can not be updated and no changes will be saved.
The javascript code as below:

function sort_skill() {
var sk = document.getElementById('ctrl_custom_field_skills');
arrTextsk = new Array();

for(i=0; i<sk.length; i++) {
arrTextsk = sk.options.text;
}

arrTextsk.sort();

for(i=0; i<sk.length; i++) {
sk.options.text = arrTextsk;
sk.options.value = arrTextsk;
}
}
function start() {
sort_skill();
}
window.onload = start;
 
Upvote 0

Chris D

XenForo developer
Staff member
To post in the customer support forums you need to first have linked your customer account to your forum username.

You can do this by going to the “Forum users” section in the Account area and adding your forum username there.

That will then allow you to post in the correct forum.
 
Status
Not open for further replies.
Top