Latest Register Log In

+ Advanced Search

State Selectors

State Selectors
By
11/28/11 (Edited 03/11/14)

WSN ships with a list of USA states. If you change your default country to another country at Admin -> Settings -> Localization, you must also change the default state list to the appropriate states for that country. For countries other than the default, submitters simply type in the state name free-form

In some cases, you want to have selectors for the states of multiple different countries. You can set this up in the tweaks.php file. Just add this in your tweaks file:

$secondarystatescountry[0] = 'Canada';
$secondarystateslist[0] = '
British Columbia
Alberta
...';
$secondarystatescountry[1] = 'Mexico';
$secondarystateslist[1] = '
Baja California
...';


Increment the array index to do as many countries as you want. Write one state name per line. By leaving the first line blank, you ensure there's no default selection.




Description Using state selectors for as many countries as you want.
Rating
Views 369 views. Averaging 0 views per day.