Ordering lists

You can order the results returned in in several ways:

Class Explanation Fields Example
order-rand Randomises the order of results Country, State, County, City  
order-pop Order by population (Descending) Country, State, City  
order-alpha Order alphabetically (Ascending) Country, State, County, City  

Ordering option groups

If you decide to add option groups to your dropdowns, you may want to control the order in which the option groups appear. 

Class Explanation Fields Example
group-order-alpha This orders the groups alphabetically Country or city   
group-order-pop This orders the option groups by population Country or city  
group-order-[continentcode] This adds the given continent to the top of the list of continents, after which they are delivered in alphabetical order Country  
group-order-rand Randomises the order of option groups Country or city  

Creating option groups in lists

In order to add option groups to lists (Such as Countries grouped by continent is this example), you'll need to add the following classes to the relevant dropdown

Snippet Explanation Fields
groupby-continents This will group your country dropdown by the continents they belong to Country field only
groupby-counties This will group your cities by the county they belong to* City field only

*County coverage is limited- please check our Roadmap