0

I know, still asking newbie questions.

Maybe it is because I am running version 2.3.1, but it's not working for me.

I have a custom field options and I am trying to sort the checkboxes.

I have tried the following:

1) In the products template

{product_sizes markup="ul" orderby="product_sizes" sort="asc"}

2) In the Channel Fields> Edit Field> Field Options, I have literally ordered the options manually. They have to come up in order, right? Nope

Let me know what I am missing or is this a known issue?

Thanks in advance

Update with example:

<ul>
<li>32 oz, 32 servings</li>
<li>4 oz, 4 servings</li>
<li>16 oz, 16 servings</li>
</ul>

I would like it to be:

<ul>
<li>4 oz, 4 servings</li>
<li>16 oz, 16 servings</li>
<li>32 oz, 32 servings</li>
</ul>

I have also tried:

{product_sizes markup="ul" orderby="field_list_items" sort="asc"}

Should I change the database type for field_list_items from "text" to something else. I have read in other postings, that it cannot sort unless you change the type to INT, but how would I have a list of checkboxes, if it is type INT?

  • what type of custom field is this? (what's the fieldtype?) – dashard Aug 20 '14 at 17:59
  • They are Checkboxes - Channel Fields> Group Name (Products)> Field Label (Sizes)> Field Options – kronus Aug 20 '14 at 19:44
  • Let me clarify something, even though it is set as checkboxes for the backend, the selections made display as a bullet point list to the end user. That is the list that I would like to sort - what the end user views – kronus Aug 20 '14 at 19:54
  • the documentation does not seem to offer sort options. you can see the docs here: ellislab.com/expressionengine/user-guide/add-ons/channel/… I did a test output in a site that I have in v2.5.3 (that's as old as I could test) and the fields output exactly as entered. If yours are not, and you've reordered them in the field definition, perhaps you need to a) clear template caches and/or b) re-save an entry to see if that changes anything. – dashard Aug 21 '14 at 3:41
  • I will give it shot when I return to work tomorrow. Thank you. – kronus Aug 22 '14 at 0:00
0

the documentation does not seem to offer sort options. you can see the docs here: https://ellislab.com/expressionengine/user-guide/add-ons/channel/custom_fields.html#checkbox-fields

I did a test output in a site that I have in v2.5.3 (that's as old as I could test) and the fields output exactly as entered. If yours are not, and you've reordered them in the field definition, perhaps you need to a) clear template caches and/or b) re-save an entry to see if that changes anything.

CONFIRMED: Re-saving the entry will display the items in the proper order.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.