4

I am using simpleform for twitter bootstrap and I am trying to style my radio buttons using the data-toggle function so that my buttons look like the radio buttons seen here:

Twitter bootstrap javascript

How do I fix my code:

<%= simple_form_for @person , :html => { :class => 'form-horizontal' } do |f| %>
<%= f.input :name %>
<%= f.input :password %>
<%= f.input :country, as: :radio_buttons, :item_wrapper_class => 'btn-group' %>
<%= f.button :submit %>
<% end %>
4

1 に答える 1

0

以下のコードスニペットを試しましたか:

<div class="btn-group" data-toggle="buttons-radio">
  <button type="button" class="btn btn-primary">Left</button>
  <button type="button" class="btn btn-primary">Middle</button>
  <button type="button" class="btn btn-primary">Right</button>
</div>
于 2013-01-24T19:05:56.053 に答える