Check this:
The wrapper API is not documented yet, but I spent some time trying to figure it out. Here is a simple example that you can configure inside the simple_form initializer.
SimpleForm.setup do |config|
config.wrappers :GIVE_YOUR_WRAPPER_A_NAME, :class => 'clearfix', :error_class => nil do |b|
b.use :placeholder
b.use :label
b.use :tag => 'div', :class => 'WHATEVER_YOU_WANT_TO_CALL_IT' do |ba|
ba.use :input
ba.use :error, :tag => :span, :class => :'help-inline'
ba.use :hint, :tag => :span, :class => :'help-block'
end
end
end
Then, when you create the form, simply specify the shell you want to use:
<%= simple_form_for @user, wrapper: 'WHATEVER_YOU_CALLED_YOUR_WRAPPER' do |form| %>
<%end%>
Hope this helps.
source
share