Open

Description
Like #1632, I want to specify different wrapper mappings for each wrapper of form.
So, I would like to be able to specify the wrapper mappings for the wrapper of form when SimpleForm.setup
.
# config/initializers/simple_form.rb
SimpleForm.setup do |config|
# ...
horizontal_forms_mapping = {
boolean: :horizontal_boolean,
check_boxes: :horizontal_collection,
date: :horizontal_multi_select,
datetime: :horizontal_multi_select,
file: :horizontal_file,
radio_buttons: :horizontal_collection,
range: :horizontal_range,
time: :horizontal_multi_select
}
# horizontal form wrapper
config.wrappers :horizontal_form, tag: 'div', class: 'mb-4', wrapper_mappings: horizontal_forms_mapping do |b|
b.use :html5
b.use :placeholder
# ...
end
# ...
end
Metadata
Assignees
Labels
No labels
Activity