Search code examples
bootstrappingcountry-codes

how to select desired country in bootsratp country picker?


The below code shows US flag and US is selected when the drop down is loaded.

<div class="bfh-selectbox bfh-countries" data-country="US" data-flags="true"></div>

enter image description here

I want to selecte UK in a form and Iraq in another form but when tried below it does not show flags of the country and the country name.

<div class="bfh-selectbox bfh-countries" data-country="UK" data-flags="true"></div>
<div class="bfh-selectbox bfh-countries" data-country="IRQ" data-flags="true"></div>

The above code selected is blank by default.

enter image description here How can I show UK and Iraq flag as how US name and flag are selected on <div class="bfh-selectbox bfh-countries" data-country="US" data-flags="true"></div>


Solution

  • I found the answer myself:

    • for UK, use data-country="GB"
    • for Iraq, use data-country="IQ"