Installation
To install the ph regions plugin, follow the following steps:
-
Download a local copy of phregions plugin and put it in any public directory of your project or use the cdn.
-
Add the following code to your website project
Using local copy:
<script src="/path/phregions-plugin.js"></script>
Using cdn:
<script src="https://phregions.eu.org/download/phregions-plugin.min.js"></script>
Plugin Usage
To use the plugin after Plugin, follow the following steps:
-
Create four select elements that will be populated with region, province, city and barangay.
-
Download a copy of phregions javascript plugin and install by following the installation instructions above.
-
Add one of the following code to a script tag
Using phregions original API instance:
initializeRegions(region_selector, province_selector, city_selector, brgy_selector);
Using self hosted original API instance:
initializeRegions(region_selector, province_selector, city_selector, brgy_selector, api_url);
Want to see the plugin in action?