Boostrap 4和Optgroups

时间:2018-03-05 19:53:37

标签: javascript twitter-bootstrap optgroup

我正在尝试在联系表单中添加一个简单的选择菜单。我需要它有选项组。我的代码在codepen中运行良好,但在我的bootstrap 4站点中不起作用。这是代码:

<label for="exampleFormControlSelect1">Example select</label>
<select class="selectpicker" id="ressource_regions_region_id">
       
               <optgroup label="Criminal Cases">
                  <option selected>Select Case Type...</option>  
                  <option value="Misdemeanor">Misdemeanor</option>
                  <option value="Felony">Felony</option>
                  <option value="Justice of the Peace  Court">Justice of the Peace Court</option>
                  <option value="Municipal Courts">Municipal Courts</option>
                  <option value="Juvenile Court">Juvenile Court</option>
                    </optgroup>
                         
                 <optgroup label="General Cases">
                     <option value="Probate">Probate</option>
                     <option value="Living Will">Living Will</option>
                     <option value="Medical Power of Attorney">Medical Power of Attorney</option>
                     <option value="Statutory Power of Attorney">Statutory Power of Attorney</option>
                     <option value="Deed Transfer on Death">Deed Transfer on Death</option>
                     </optgroup>
                </select>

有没有办法让这个工作与bootstrap? 谢谢你的时间。

0 个答案:

没有答案