How to insert bootstrap form helper country picker

2019-08-05 02:11发布

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.com/country/#example4

3条回答
Root(大扎)
2楼-- · 2019-08-05 02:35

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>
查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-08-05 02:44

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.com/gettingstarted/#jquery-plugins

查看更多
叛逆
4楼-- · 2019-08-05 02:45

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>
查看更多
登录 后发表回答