Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Testing the theme with better exposed filters, and the checkboxes are all following the style rules for .form-control
Not critical, but wondering if the boostrap maintainers are interested in accommodating this out of the box?
Screenshot attached.
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2013-10-26 at 1.42.13 PM.png | 21.62 KB | mattsmith3 |
Comments
Comment #1
stephen Piscura CreditAttribution: stephen Piscura commentedWas just about to post this feature request!
Comment #2
ChristianAdamski CreditAttribution: ChristianAdamski commentedLook at bootstrap/theme/process.inc at function _bootstrap_process_input and comment out or remove the 'select' in there.
Not writing a patch, as this seems to have changed in -dev.
Comment #3
evtm CreditAttribution: evtm commentedStill doesn't work. Running the latest Beta II of Bootstrap theme and the dev of BEF.
Any fix for this?
Comment #4
Ruslan PiskarovHot fix on JS side:
Comment #5
rcodina CreditAttribution: rcodina commentedSolution on #4 worked for me. However, it took me a while to figure out how to use it to solve bootstrap theming bugs with it. This is the reason why I have created a small custom module using code on #4 and uploaded it to github:
https://github.com/rogercodina/bef_bootstrap_fix
I hope this can help somebody else. Thank you so much Ruslan Piskarev!
Comment #6
EricRondo CreditAttribution: EricRondo commentedSorry I am not very familiar with patches but i ended up with the following solution in better_exposed_filters/better_exposed_filters.theme :
inserted between lines 147-148 (theme_select_as_checkboxes()) and between lines 653-654 (bef_checkbox()).
Hope this can help anybody !
Comment #7
cmonnow CreditAttribution: cmonnow commentedIf theme_bef_checkbox() was introduced as discussed in https://www.drupal.org/node/1404656 then @EricRondo's solution can be cleanly implemented as an override in one's theme rather than having to hard code this change (and many others) within the BEF module.
At least for now you can override classes for the parent element using yourtheme_preprocess_select_as_checkboxes() within your theme.
Comment #8
markhalliwellNot particularly, no. We cannot continue adding support for every single module that decides to do things just a bit differently. However, I won't say a definite "no" as this may be something that could be added later down the road if there were a decent and comprehensive enough of a patch submitted.
Comment #9
cmonnow CreditAttribution: cmonnow commentedForgot to update my comment. BEF module hacks are no longer necessary as theme_bef_checkbox() was recently added ( i.e. @EricRondo's hack can now be performed in the theme).
Comment #10
stefan93 CreditAttribution: stefan93 commentedthanks @ChristianAdamski it works for me
Comment #11
ryan_neff CreditAttribution: ryan_neff commentedThanks @cmonnow - that example was excellent, it worked for me.
Comment #12
pringlz CreditAttribution: pringlz commentedHello all!) It was better solution and I don't understand why nobody of maintainers don't add this to BEF module?
Here very small module of cmonnow with small js fix. https://github.com/rogercodina/bef_bootstrap_fix
Please, add this fix to module!
Comment #13
entropea CreditAttribution: entropea commentedYep the https://github.com/rogercodina/bef_bootstrap_fix module works a treat. Thanks @rcodina
Comment #14
montesajudy CreditAttribution: montesajudy commented#5 worked like magic! Thank you @rcodina
Comment #15
carlovdb CreditAttribution: carlovdb commented#5 worked perfect for me!
Comment #16
meles CreditAttribution: meles commentedBetter way for fix it(add in template.php):
Comment #17
meles CreditAttribution: meles commentedTesting on collapse all work excellent!
Modules: Views + Panels + BEF
Better way for fix it(add in template.php):
Comment #18
markhalliwellChanging to proper branch version for #2554199: Bootstrap 4.
Comment #19
thelinhuk CreditAttribution: thelinhuk commented#17 Works great . Thanks xMELESx. I also add extra js to remove collapsible class make it look better
Comment #20
mitche42 CreditAttribution: mitche42 as a volunteer commentedHow can #17 be adapted to work with 7.x? (It didn't work for me, (checkboxes and labels disappeared))
Or is there a way to get #5 to respect the collapsible option? (It did work for me, but doesn't collapse)
Comment #21
Katy Jockelson CreditAttribution: Katy Jockelson commentedThanks Ruslan P and rcordina, #5 saved me a load of faffing with CSS :)
Comment #22
nithinkolekar CreditAttribution: nithinkolekar commentedas per the http://getbootstrap.com/docs/4.0/components/forms/
Isn't that mean there is no need of form-control class for form components other than mentioned above?
Comment #23
sano CreditAttribution: sano commentedI tried the module at #5 and it worked - cleaned-up the check boxes - but did not make the fields collapsible. The #17 worked nicely for both - cleaning the arrangement of check boxes while making the controls collapsible. Besides renaming the hook functions to reflect the module name it is also necessary to populate the $names array in the hook_pre_render function with the names of the controls in the exposed form. I tested this in drupal 7 (to answer question from @mitche42). Thanks @xMELESx.
Comment #24
Katy Jockelson CreditAttribution: Katy Jockelson commented@sano - like you, I need both the tidying of the select elements rendered as checkboxes, and also for the collapsible feature to work.
I have the code from #17 in my template.php file and I have changed the theme name, but I am not sure what to put in the $names array - can you help at all?
Also, can you confirm that the code in #17 works on its own and you don't also need the module in #5?
TIA
Comment #25
sano CreditAttribution: sano commentedHi Katy, I think I am not using any of these solutions - I do not remember why any more :-(
...but to answer your question: the item in the array - like the 'field_TESTCONTENT_category_value' - stands for the name of the field in the exposed filter - if I remember correctly. It is the last item in the link that you get when right-clicking the exposed filter in the view. In this example the array item would be "field_region_nr_target_id":
https://nabezky.sk/en/admin/structure/views/nojs/config-item/frontpage/d...
by the way, this is what I ended up with: https://nabezky.sk - see the Custom item in the submenu
Comment #26
shelaneThis theme will not be supported for Bootstrap 4. See alternative themes for this support.