2016-12-15 58 views
0

我試圖將此引導窗體助手添加到我的窗體,但由於某種原因沒有填充。少了什麼東西?我究竟做錯了什麼?Bootstrap窗體助手國家和州不顯示

這裏是的jsfiddle:https://jsfiddle.net/2fy1me4y/

來源:http://js.nicdn.de/bootstrap/formhelpers/docs/state.html

  <div class="form-group col-lg-4"> 
       <label>State</label> 
       <select id="countries_states1" class="input-medium bfh-countries" data-country="US"></select> 
       <select class="input-medium bfh-states" data-country="countries_states1"></select> 
       <small class="text-muted">Provide the state you currently reside</small> 
      </div> 
+0

我覺得這是在這裏sovled:http://stackoverflow.com/questions/25929769/how-to-insert-bootstrap-form-helper-country-拾取器到一個形式 –

回答

2

這裏是我創造它的工作的一個例子。請注意,我沒有使用CDN,因爲我無法啓動它。沒有深入瞭解它。

https://jsfiddle.net/5bbnt7xc/1/

HTML:

<div id="countries_states2" class="bfh-selectbox bfh-countries" data-country="US" data-flags="true"> 
    <input type="hidden" value=""> 
    <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"> 
     <div role="listbox"> 
      <ul role="option"> </ul> 
     </div> 
    </div> 
</div> 
<div class="bfh-selectbox bfh-states" data-country="countries_states2"> 
    <input type="hidden" value=""> 
    <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"> 
     <div role="listbox"> 
      <ul role="option"> </ul> 
     </div> 
    </div> 
</div>