State / Province Select

Overview


This simple plugin replaces state/province input field with select box containing states for selected country

Activating the module


  1. The plugin is free and available to all HostBill users. In order to activate the plugin go to Settings→ Modules→ Plugins → Inactive, find and activate State/Province Select plugin.
  2. Once the plugin is activated you will be directed to Settings→ Modules→ Plugins to configure the module.

Module configuration


Fill in the configuration fields:

  1. Choose module display name
  2. Select if you want the plugin to be accessible for all staff members or only selected staff members

Adjusting state names, adding country↔states mapping


To add your own country → states mapping:

  1. Create new json file in includes/modules/Other/state_province_select directory, ie: new.json
  2. Add your rules as json structure. Use ISO country name as key, sample for Belgium (BE)  below:

    Sample states
    {
    	"BE":["Antwerpen","Limburg","Oost-Vlaanderen","Vlaams-Brabant","West-Vlaanderen","Waals-Brabant","Henegouwen","Luik","Luxemburg","Namen"]
    }


Note: You can use existing rules as reference, available in file: includes/modules/Other/state_province_select/default.json


Using the module


Once the module is activated, upon selecting one of the supported countries (as listed above), the dropdown menu will display the list of available states/provinces in the relevant section: