Reputation: 95
I just added the formtastic bootstrap gem to my ruby on rails bootstrap application. This successfully renders all my forms correctly, but strangely, all of my radio buttons have disappeared! I haven't yet been able to find out why that is the case. Has anyone encountered a similar issue? Is there a new class for formtastic bootstrap radio buttons?
EDIT: I noticed that adding :inline => true
, partially solves the issue by showing the radio buttons in the same line as the label. Although this at least makes the radio buttons show up, I am looking for a way for them to show up and be vertically aligned properly. Unfortunately, adding the following does nothing to help:
:input_html => {:style => 'vertical-align: top'},
Any help would be much appreciated.
Upvotes: 2
Views: 342
Reputation: 95
I've discovered that bootstrap adds padding and margins that make your radio buttons disappear. I eventually ended up overriding these with margin: auto and padding: inherit by adding a custom formtastic_changes.css and importing it in my application.css.scss after importing bootstrap.css.
Upvotes: 1