Give administrators the ability to limit country options

javierreartes - August 18, 2009 - 21:59
Project:Location
Version:6.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Is there a way of choosing which countries to display? I would like to have only a predefined set of countries to be displayed everywhere including Views filters. Currently it shows all the countries which is in my case too much.

Thanks!
Javier

#1

blueblade - August 27, 2009 - 03:32

i would like to know how to do this too =)

#2

j0rd - October 28, 2009 - 03:46

+1 needing to know how to do this. I can't figure it out either.

#3

marqpdx - October 29, 2009 - 21:35

I would like to limit countries to only those which are part of the dataset the view represents. Say we have 100 nodes to search from, and they are hotels in 30 counties, and i want to expose the Location (Country/City). can we limit the country's in the exposed filter dropdown only to the 30 in the dataset, instead of all of them??

thanks,
m

#4

rooby - November 25, 2009 - 23:09

In the function location_get_iso3166_list in location.inc is the list of countries.

You can comment out the ones you don't want. Just put // at the start of the lines with the countries you don't want in the list.

#5

rooby - November 25, 2009 - 23:15
Title:How to limit the countries displayed in the dropdown» Give administrators the ability to limit country options
Version:6.x-3.1-rc1» 6.x-3.x-dev
Component:Miscellaneous» Code
Category:support request» feature request

Changing this to a feature request.

Administrators should be able to select, from the list of all countries, which countries will be options in the country field.

 
 

Drupal is a registered trademark of Dries Buytaert.