winmarkltd / BootstrapFormHelpers

Bootstrap Form Helpers
https://bootstrapformhelpers.com
1.14k stars 374 forks source link

can't get selected values from counry selection #264

Open iosdhaya opened 8 years ago

iosdhaya commented 8 years ago

using following code <div id="Sort_country" class="bfh-selectbox bfh-countries" data-country="US" data-flags="true" data-name="country" data-blank="false" data-filter="true">

HamjalSoftware commented 8 years ago

I use the following jQuery code to get the selected text.

$("[id$='_selectedcountry']").val($('#mycountry .bfh-selectbox-option').text());

Hope this will help.

simioluwatomi commented 7 years ago

How can I get the full country name and state from this? It is only submitting short codes. "US" instead of "United States"

RaziaMullan commented 7 years ago

No, It is not. You will get the full names with this code.

ghost commented 6 years ago

$('.bfh-selectbox-option').first().text() for getting full Country name