Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chosen dropdowns, class chosen not set #50

Open
jberculo opened this issue Sep 27, 2016 · 1 comment
Open

chosen dropdowns, class chosen not set #50

jberculo opened this issue Sep 27, 2016 · 1 comment

Comments

@jberculo
Copy link

Could there be an issue with the chosen dropdowns? I've got two installs, and on both the class "chosen" is not set, so the dropdowns are not initialised.

@derralf
Copy link

derralf commented Oct 12, 2016

I had problems with the "normal" DropdownField too.

I think it's because of the newly added BootstrapDropdownField(.php/.ss) which results in a DropdownField always being rendered with BootstrapDropdownField.ss (in your case: where $extraClass is not added to the select tag and the select tag is wrapped) even if i don't want that button/dropdown/toggle functions.

BootstrapFieldList.php line 55
$bootstrapCandidate = "Bootstrap{$className}"

Some other features weren't working as expected either (setEmptyString or setSource or Dropdownfield not working correctly with BootstrapDropdownField.ss and BootstrapDropdownField missing some features)  - I don't remember exactly.

I wanted to add the bootstrap-select library (https://silviomoreto.github.io/bootstrap-select/) myself so I had to override the BootstrapDropdownField.ss template to get the standard DropdownField rendered (copied silverstripe-framework/templates/forms/DropdownField.ss and renamed it to BootstrapDropdownField.ss). Maybe this workaround works for the chosen-dropdown as well.

@unclecheese @colinedmz
Maybe the BootstrapDropdownField class and template should be renamed to BootstrapSelectDropdownField (or similar) to avoid those conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants