OK, generating your dropdown list of countries will probably be the hardest part, you’ll definitely need some PHP skills to make that happen. You can do it in the WP template, a custom shortcode, or in a plugin template using the “search” shortcode with a customized search control.
The complexity is the same whether you use a clickable list of countries or a dropdown because you be doing all your own coding, the plugin doesn’t have the ability to do this sort of thing. Dropdowns are much less user-friendly than letting users see all the choices, but if you have limited space they can be your only option.
If you are not using the search shortcode, you’ll need to construct your links. There’s two ways to go there: either place all the terms in the link so the resulting list shows records from the selected country, or set up the list shortcode as a dynamic shortcode, so the link will contain only the name of the country.
To set up a link that shows a search result, you need to add several values to the link to your list page like this:
?search_field=country&value=US&operator=LIKE&submit=Search
That will give you all the records with a “country” value of “US”
So your PHP code will build one of those for each country the user can select.
The list of countries can be gotten from the database (by collecting all the unique entries for the “country” field) or by using the values set up in the Participants Database field definition for your countries field. It could also be hard-coded into the page as an array that is used to generate your country selector.
If you want to get the list of countries from the field definition, you can use this method:
Participants_Db::get_field_atts('country','values')
That will give you an object with a serialized array of the values in the property ‘values’ from the field named ‘country’
Anyway, there are several ways to go, I’ve given you a few details, but you get the idea.