1

I installed the Bootstrap Material Design in my Ruby on Rails application and every animation is functioning properly, but i can´t see the checkboxes. My code for the checkboxes is:

<div class='form-group'>
  <div class='control-label col-sm-2'>
  </div>
  <div class='col-sm-8'>
    <%= f.input :active, :as => :boolean, :label => false, :inline_label => true %>
  </div>
</div>

Can anyone Help me please?

Thank you all!

T J
  • 42,762
  • 13
  • 83
  • 138
João Belo
  • 47
  • 11

2 Answers2

0

use f.check_box instead of f.input this:

<div class='form-group'>
  <div class='control-label col-sm-2'>
  </div>
  <div class='col-sm-8'>
<%= f.check_box :active, :as => :boolean, :label => false, :inline_label => true %>
  </div>
</div>
Rehan Munir
  • 245
  • 1
  • 3
  • thanks for the answer. If i use check_box instead of input the label doesn't show. It only appears the checkbox and it isn't the material design one but the regular checkbox (without the animation). – João Belo May 02 '16 at 13:20
  • use it like `
    `
    – Rehan Munir May 02 '16 at 13:30
  • Thanks, now it's working, but it still uses the checkboxes without the animations, my goal is to use [this animations](http://fezvrasta.github.io/bootstrap-material-design/#checkbox) – João Belo May 02 '16 at 14:50
  • **this is any example code for this animations** `

    Notify me about updates to apps or games that I've downloaded

    `
    – Rehan Munir May 03 '16 at 07:10
  • if u think my answers are helpful for you then give me plus point or accept my answer. thanks – Rehan Munir May 03 '16 at 07:13
0

I finally got who it's doing:

<div class='form-group'>
  <div class='control-label col-sm-2'>
</div>
  <div class="checkbox col-sm-8">
      <label> <%= f.check_box :active, :as => :boolean, :label => false, :inline_label => true %> Active</label>
  </div>
</div>

You need to add "checkbox" to the div class of the label and then you will see the checkbox animations for the bootstrap material design

João Belo
  • 47
  • 11