ruby on rails - rails3, simple_form, twitter bootstrap: radio buttons break onto differnet lines -


my rails 3.1.3 app using simple_form 2.0.1 , twitter_bootstrap_rails 2.0.3.

all form elements looks fine except when use radio collection

= f.collection_radio_buttons :my_fieldname, [['x1', 'foo'], ['x2', 'bar'], ['x3', 'foobar'], ['', 'none']], :first, :last 

the radio buttons , labels displayed vertically this:

() foo () bar () foobar () none 

instead of this:

() foo () bar () foobar () none 

i have "form-horizontal" class assigned simple_form_for, , other form elements fine.

do need special class attached f.collection_radio_buttons?

try this

<%= f.input :save_it, :collection => [['yes',true] ,['no', false]], :as => :radio_buttons, :item_wrapper_class => 'inline', :label => 'save now?' %> 

Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -