Jump to content

Recommended Posts

Posted

I'm trying to sort a $pages->find result by a checkbox value.

sort=my_repeater.my_checkbox

The idea is that I get pages with the checkbox unticked before pages with the checkbox ticked, i.e. 0 to 1. Because I haven't given my checkbox fields a name, they are using the field name. I can see in PW that the checkboxes are labelled

my_checkbox_repeater123456

So I think my sort is not working. Is there a way around this?

Posted

The id at the end of the field name is only used in the admin backend to have unique field names for each repeater otherwise they would overwrite each other on save. 

Posted

I can see there is an issue when I'm trying to sort pages by the repeater value. So when I'm doing

sort=my_repeater.my_checkbox

and wanting an order of 0 to 1, if there are no repeater items on a page, they are appearing first in my list. Can I do something for that?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...