最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to insert bootstrap form helper country picker to a form? - Stack Overflow

programmeradmin0浏览0评论

how i insert above bootstrap plugin to my form. I import all necessary files to my form document. and I insert only this code. I never wrote any js code. But it is not work.

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

Here my country picker link. Have any idea for my problem?

how i insert above bootstrap plugin to my form. I import all necessary files to my form document. and I insert only this code. I never wrote any js code. But it is not work.

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

Here my country picker link. Have any idea for my problem?

http://bootstrapformhelpers./country/#example4

Share Improve this question asked Sep 19, 2014 at 8:41 NadishanNadishan 5802 gold badges7 silver badges21 bronze badges 1
  • Have you included bootstrap ? have you included jQuery ? Can you share you whole source ? – BENARD Patrick Commented Sep 19, 2014 at 10:40
Add a ment  | 

3 Answers 3

Reset to default 3

To make it work you should add links to CSS and JS files of Bootstrap Form Helpers library which should be previously downloaded on your server

<link href="css/bootstrap-form-helpers.min.css" rel="stylesheet">
<script src="js/bootstrap-formhelpers.min.js"></script>

Read carefully this page http://bootstrapformhelpers./gettingstarted/#jquery-plugins

is your index.html has all of:

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

<!-- Bootstrap Form Helpers -->
<link href="css/bootstrap-form-helpers.min.css" rel="stylesheet" media="screen">

<!-- jQuery -->
<script src="js/jquery-1.10.2.min.js"></script>

<!-- Bootstrap -->
<script src="js/bootstrap.min.js"></script>

<!-- Bootstrap Form Helpers -->
<script src="js/bootstrap-formhelpers.min.js"></script>

This may be too late for you but I found this on another question and it worked for me:

<div id="countries_states2" class="bfh-selectbox bfh-countries" data-country="US" data-flags="true">
        <input form='form1' type="hidden" value="" required>
        <a class="bfh-selectbox-toggle" role="button" data-toggle="bfh-selectbox" href="#">
                <span class="bfh-selectbox-option input-medium" data-option=""></span>
                <b class="caret"></b>
        </a>
        <div class="bfh-selectbox-options countries" >
               <div role="listbox">
                      <ul role="option">
                      </ul>
               </div>
        </div>
</div>
发布评论

评论列表(0)

  1. 暂无评论