I am using the simple_form gem (https://github.com/plataformatec/simple_form) to help out the forms in my app. But I’d like to display the many radio buttons I’ve got here in li tag. Simple_form now generates span wrapper tag for each radio buttons. Like this:
<%= t.input :arrives_in, :collection => [1,2,3,4], :as => :radio %>
#=> <span><input type='radio'><label>1</label></span>
any way I can have it wrap the input and label part in an li instead of span?
Thank YOU!
You can pass
:item_wrapper_tagto you input like this:You can also, pass the
:collection_wrapper_tagoption to change the wrapper of all radio inputs like this: