I use twitter-boostrap and I'd like to use these radio-buttons in my form. The problem is when I click on any of these buttons, the form is immediately submitted. How to avoid this? I just want to use default buttons like radio-buttons.
from:
<%= form_for @product do |f| %>
<div class="control-group">
<%= f.label :type, :class => 'control-label' %>
<div class="controls">
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn">Button_1</button>
<button class="btn">Button_2</button>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', products_path, :class => 'btn' %>
</div>
<% end %>
javascript:
// application.js
$('.tabs').button();