Polymer-country-region-selector

View the Project on GitHub benkeen/polymer-country-region-selector

This a Polymer component for adding country-region dropdowns to your forms. The component automatically updates the region dropdown with whatever regions are appropriate, based on the selection in the country dropdown.

This page contains a few examples of how it can be configured. For more information, see the github project.

1. Out the box

<country-region-selector></country-region-selector>

2. Custom Names

<country-region-selector
	countryDropdownName="c"
	regionDropdownName="r"></country-region-selector>

3. Custom Default & blank labels

<country-region-selector
	countryEmptyLabel="No countries!"
	regionEmptyLabel="No region selected!"
	regionBlankOption="Select a country to see the list of regions"></country-region-selector>>

4. country short codes (for values in country dropdown)

<country-region-selector
	countryUseShortcode="true"></country-region-selector>

5. default country set

<country-region-selector
	countryValue="Canada"></country-region-selector>

6. default country and region set

<country-region-selector
	countryValue="Canada"
	regionValue="British Columbia"></country-region-selector>

7. custom region <select> field

Whoah! custom markup!
<country-region-selector
	targetRegionDropdownId="myCustomField">
<div>
	Whoah! custom markup!
	<select id="myCustomField"></select>
</div>