I would like to request that you kindly add a dropdown list of states in Nigeria with another dropdown list for local government areas (sub administrative areas) which depend on a selected value from the states field. It should work in a such a way that when a state is selected from the dropdown list the component local government areas of the selected state drops down for selection automatically.
It will also be ideal to make the state field a required one rather than the city field. This is because cities depends on states in the Nigeria address format.

Many thanks to you guys for this great job.

Comments

opurum73 created an issue. See original summary.

goodmuyis’s picture

Not Sure this could happen in AddressField but you could try another module Multiselect if that helps, but you wont be using address field

Was Wrong with the above, I have never create patch before so I will advice you manually edit the `addressfield.administrative_areas.inc` and add your states array as follows just above the return $administrative_areas;

	$administrative_areas['NG'] = array(
		'AB' => 'Abia',
		'AD' => 'Adamawa',
		'AK' => 'Akwa Ibom',
		'AN' => 'Anambra',
		'BA' => 'Bauchi',
		'BY' => 'Bayelsa',
		'BE' => 'Benue',
		'BO' => 'Borno',
		'CR' => 'Cross River',
		'DE' => 'Delta',
		'EB' => 'Ebonyi',
		'ED' => 'Edo',
		'EK' => 'Ekiti',
		'EN' => 'Enugu',
		'FC' => 'Abuja',
		'GO' => 'Gombe',
		'IM' => 'Imo',
		'JI' => 'Jigawa',
		'KD' => 'Kaduna',
		'KN' => 'Kano',
		'KT' => 'Katsina',
		'KE' => 'Kebbi',
		'KO' => 'Kogi',
		'KW' => 'Kwara',
		'LA' => 'Lagos',
		'NA' => 'Nasarawa',
		'NI' => 'Niger',
		'OG' => 'Ogun',
		'ON' => 'Ondo',
		'OS' => 'Osun',
		'OY' => 'Oyo',
		'PL' => 'Plateau',
		'RI' => 'Rivers',
		'SO' => 'Sokoto',
		'TA' => 'Taraba',
		'YO' => 'Yobe',
		'ZA' => 'Zamfara',		
  );

//Above this
return $administrative_areas;

-------
Sai Buhari

bojanz’s picture

Title: Add State+LGAs dropdown list » Add states for Nigeria
Status: Active » Needs work

Retitling. Subadministrative areas are outside of scope for this module, but we can add the administrative areas (states).

We need a patch with the changes from #2.

I have validated the list, and found only one problem:

'FC' => 'Abuja',

Shouldn't this be called "Federal Capital Territory"? It would also match the position in the list (Abuja alphabetically would be at the beginning, not in the middle)?

bojanz’s picture

Status: Needs work » Closed (duplicate)
ugintl’s picture

Where to find the list of states of other countries to add like this?