MarkE Posted March 7, 2020 Share Posted March 7, 2020 How do I get the sort order of a dropdown (in a page reference field using asmselect) to be how I want it. It seems to be the original order of creation, no matter what I specify. Changing the sort order in the pages or using a selector sort= on the field seems to have no effect. Link to comment Share on other sites More sharing options...
dragan Posted March 8, 2020 Share Posted March 8, 2020 Works here. I just tried it out with selector string: parent=1097, include=hidden, sort=-name and it does list by name in descending order. Link to comment Share on other sites More sharing options...
MarkE Posted March 9, 2020 Author Share Posted March 9, 2020 Whoops, I was getting tripping myself up. Originally I put the selector in the field admin page, then later added a hook without deleting the original selector. The hook over-rides the selector, so adding a sort to the original selector has no effect. As a matter of practice, I'll try and remember to delete selectors if I add a hook, but it's an easy thing to forget. Then later, you see the selector and think that's where the criteria are applied ? Perhaps it's better to just use hooks in the first place, so everything is consistently in the same place? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now