Bootstrap内联表单不适用于简单表单

时间:2016-04-07 04:24:04

标签: twitter-bootstrap ruby-on-rails-4 simple-form

我无法显示我的simple_form内联:

<div class="row">
  <div class="col-md-12">
    <%= simple_form_for '', :html => { :class => 'form-inline' }, url: vehicleTrack_path, :method => :get do |f| %>
        <%= f.input :search, collection: @all_vehicles, :label_method => :objectno, :label => 'Vehiculo' %>
        <%= f.button :submit, value: "Buscar",:name => nil%>
    <% end %>
   </div>
</div>

显示器:

enter image description here

但是,如果我只是尝试使用Bootstrap演示代码,它可以正常工作:

<form class="form-inline">
  <input type="text" class="input-small" placeholder="Email">
  <input type="password" class="input-small" placeholder="Password">
  <label class="checkbox">
    <input type="checkbox"> Remember me
  </label>
  <button type="submit" class="btn">Sign in</button>
</form>

显示器:

enter image description here

0 个答案:

没有答案