You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks more like a hack, instead there could be an ability to bound wrappers with a "set" or a "style" (e.g. set named :horizontal). So in views users would simply do something like:
So devs would be able to override the wrapper and specify a set name so simple_form does know which wrappers to use for field types.
Inside the config this could look like:
config.wrappers:horizontal_boolean,tag: 'div',class: 'form-group',error_class: 'has-error'do |b|
b.set:horizontal# set nameb.map:boolean# field type#...end
The approach with wrapper_mappings could be useful in some specific situations, but is not very convenient to use it more often.
The text was updated successfully, but these errors were encountered:
https://github.com/rafaelfranca/simple_form-bootstrap/blob/master/app/views/examples/_horizontal_form_sf.html.erb#L3
This looks more like a hack, instead there could be an ability to bound wrappers with a "set" or a "style" (e.g. set named :horizontal). So in views users would simply do something like:
= simple_form_for @model, wrapper: :a_custom_wrapper, set: :horizontal
So devs would be able to override the wrapper and specify a set name so simple_form does know which wrappers to use for field types.
Inside the config this could look like:
The approach with wrapper_mappings could be useful in some specific situations, but is not very convenient to use it more often.
The text was updated successfully, but these errors were encountered: