Skip to content

Commit

Permalink
Merge pull request #2422 from samvera/set-defaults-for-wrappers-inline
Browse files Browse the repository at this point in the history
⚙️ Add default for simple form wrappers inline
  • Loading branch information
kirkkwang authored Jan 21, 2025
2 parents 6b6539f + 9bea382 commit 6939a58
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/initializers/simple_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,12 @@
end
end
end

config.wrappers :inline, tag: 'span', class: 'form-group inline', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.use :label, class: 'control-label mr-1'
b.use :input, class: 'form-control mr-1'
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
end
end

0 comments on commit 6939a58

Please sign in to comment.