I have a form with control group that has multiple input fields, that are displayed in-line. One of these fields has error validations. Unfortunately it is in the middle of the control group and for some crazy design reasons (not my call) I cannot move it to the far right of the group. So I would like the error messages to be appended to the whole control group, not the individual input fields, like it is by default. So my questions are:
1) Is it possible to do in the easy, non-intrusive way eg. only changing configuration files? I tried to meddle with:
config/initializers/simple_form_bootstrap.rb
but the best I could do was:
config.wrappers :none, :tag => false do |b|
b.use :html5
b.use :placeholder
b.use :label
b.use :input
end
config.wrapper_mappings = { some_input: :none }
and it's almost working, except the error message disappears after I click submit. Other attempts resulted in form not being displayed at all.
2) How can I change the behavior of Simple Form and/or Client Side Validations in a way that I explicitly say which div I want my error message to be displayed? I am aware that this contradicts the idea of errors being shown somewhere around the bad input field, but I really don't want to write custom validation just for this one form.