Open bettinz opened 8 years ago
You can set this with a data attribute.
In your template you can do something like this
{{ form_row(form.myfield, {'attr':{'data-theme':'bootstrap'}}) }}
on in the form type class when adding that field:
'attr' => [
'data-theme' => 'bootstrap'
]
I agree that a default set in yml would be good. I'll look into that.
Thanks for pointing this out. I haven't actually used this for a long time and didn't know about the theme project. :) I'll have to update the docs because https://github.com/t0m/select2-bootstrap-css is obsolete now.
Hello,
select2 provide global configuration : $.fn.select2.defaults.set( "theme", "bootstrap" );
my 2c
Hello, I'm using your bundle and it works fine. The only problem is bootstrap theme: I'm using the official theme from https://github.com/select2/select2-bootstrap-theme but it doesn't work. It says I need to set theme: "bootstrap" when initialize select2. Can you help me to do that?
I've solved adding
theme: "bootstrap",
in bundles/tetranzselect2entity/js/select2entity.js
do you have a more clean solution, like config.yml? Thanks