Hi,
I have a multi select custom field, which gets value from the external db. The values are numeric. I have used 'sortOptionsByValue()' to order the options but it is not ordering them correctly.
e.g: Value 1, 2, 3, 11
are ordered: 1, 11, 2, 3.
Need any advice. Thanks in advance.
That is correct, you've chosen to use a field that works with strings, and that's the right way to order strings.
If you want it to behave as a number, you will need to change to using a numeric field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.