Using Simple Form and Bootstrap, I would like the following to be present on the line, instead of the submit button below the input selection.
<%= simple_form_for :select_rollout, :html => {:class => "form-inline"}, do |f| %> <%= f.input :rollout_id, collection: @rollout_options, :label => false %> <%= f.button :submit, "Apply" %> <% end %>
The following solution only works for inputs (the submit button appears outside the div for inputs):
<%= form.input :city, label: 'City/State/Zip', input_html: {class: 'span3'}, wrapper_html: {class: 'controls controls-row'} do %> <%= form.input_field :city, class: 'span1' %> <%= form.input_field :state, class: 'span1' %> <% end %>
source share