Download Link

Installation

To install the ph regions plugin, follow the following steps:

  1. Download a local copy of phregions plugin and put it in any public directory of your project or use the cdn.

  2. 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:

  1. Create four select elements that will be populated with region, province, city and barangay.
  2. Download a copy of phregions javascript plugin and install by following the installation instructions above.
  3. 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?