Closed lolmx closed 6 years ago
Thanks. Will add the tag.
I've received an email about BC breaks regarding this issue, well I told him to overwrite the option as I think that all in all, this change worth it 👍
For those interested:
Only Bootstrap 3: set the option elements_selector to > div
Only Bootstrap 4: set the option elements_selector to > fieldset
Maybe one nice solution is to allow to modify elements_selector with the given options? I tried that before submitting the pr, but didn't work (tbh i didn't go further in the why it did not).
Like, by default elements_selector: '> div, > fieldset'
, but overridable with options.
By the way i wrote > div, > fieldset
because there are some cases where symfony still render a div tag in my project.
I use symfony 3.4 and bootstrap 4.
If my collection is a simple type (like TextType) it's rendered within a div, but when i work with a complex type (my use case was 3 selects) then symfony render the whole thing into a fieldset.
Furthermore, if overridable with options, people altering the default symfony form theme would still be able to use the plugin in their project.
What you think about that?
Overwritting elements_selector
is possible in the options, strange that it didn't work for you. Code set the settings using a regular var settings = $.extend(true, {}, defaults, options);
and thus it should work.
I think this pull request is also related to issue #105
This pull request is related to #123.
I encountered the same problem raised by @codedmonkey and his solution solved the issue.