Hello,
is there a way to sort ASC/DESC a “select field” in the backend?
I have a select choice list like this
Black Hairstreak
Duke of Burgundy
Brimstone
Cryptic Wood White
Brown Argus
Brown Hairstreak
Chalk Hill Blue
Essex Skipper
Chequered Skipper
Adonis Blue
Comma
Common Blue
Dark Green Fritillary
Dingy Skipper
Clouded Yellow
and I would like to show the choice list on the backend like this (ASC)
Adonis Blue
Black Hairstreak
Brimstone
Brown Argus
Brown Hairstreak
Chalk Hill Blue
Chequered Skipper
Clouded Yellow
Comma
Common Blue
Cryptic Wood White
Dark Green Fritillary
Dingy Skipper
Duke of Burgundy
Essex Skipper
The main issue here, is that list is not complete and I will have to add some choices in the futur.
Best Regards
Nexus
You need to use an acf/prepare_field filter and sort $field['choices']
Thanks @hube2 !! That save my day 🙂