Latest Register Log In

+ Advanced Search

State Selectors

State Selectors
By
Nov 28, 2011 (Edited Mar 11, 2014)

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 387 views. Averaging 0 views per day.
Similar Listings