Skip Navigation

[Resolved] Sorting results alphabetically by checkboxes

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to order the view result based on the checkboxes field options

Solution:
You do not see the checkboxes field with the ordering settings because checkboxes fields are having multiple values and stores in special format as serialised array.

So, you can not order by serialised array that is why you do not see the checkboxes field with ordering section.

Relevant Documentation:

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by andyB-12 3 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1737639

Hey there I created some search forms with the legacy forms editor and integrated them via shortcodes in my Divi layouts. Now I have one search view, which I want the results to sort alphabetically by results of checkboxes I added via custom fields. Somehow I can see almost all added custom fields when choosing the primary sorting, but I cannot find the checkboxes fields. Is there a solution for it?

These are my custom-fields: hidden link

And here is the field where I am searching for the custom field to sort the results by it: hidden link

#1738301

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You do not see the checkboxes field with the ordering settings because checkboxes fields are having multiple values and stores in special format as serialised array.

So, you can not order by serialised array that is why you do not see the checkboxes field with ordering section.

#1745377

My issue is resolved now. Thank you!

#1745621

Sorry, the client wants that the search results order by day. Is there any workaround to manage that the results sort by the days? I added the days as multiple checkbox field and each day is one checkbox. I know you told me, that this is not possible with checkboxes, but maybe there is another workaround?

#1746093

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As I said, you can not able to use the any checkboxes type field with ordering section. As I acknowledged with my previous reply that checkboxes are special fields that is stored as serialised array into database and you can not use it as order by.

you will require to use number field or text field where you should add the day value and then use this number or text field with your ordering section.

#1758185

My issue is resolved now. Thanks!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.