Twitter bootstrap is very useful but i also often use Hierarchical select and i just managed to find what was breaking it.
There is a bug coming from file.
I can't actually say what in twitter_bootstrap_form_element() and twitter_bootstrap_button() breaks it but i have commented these 2 functions out and used

function twitter_bootstrap_button(&$vars) {
$element = $vars['element'];
$element['#attributes']['type'] = 'submit';
element_set_attributes($element, array('id', 'name', 'value'));
$element['#attributes']['class'][] = 'btn'; // Add bootstrap class
$element['#attributes']['class'][] = 'form-' . $element['#button_type'];
  if (!empty(
$element['#attributes']['disabled'])) {
$element['#attributes']['class'][] = 'form-button-disabled';


'<input' . drupal_attributes($element['#attributes']) . ' />';

and now it works.

I can't really debug more cause i have (sadly) no clue what's going on in these functions but if someone knows i'll be happy to hear it.


Additional symptoms of this problem can be found at #1692198: Conflict with ajax.js. For cross reference, here is a bug report in the hierarchical_select issue queue: #2134201: Bootstrap Theme Breaks Hierarchical Select Dropbox.


heddn’s picture

What features of hierarchical select are you using? Can you provide steps to reproduce the problem and a description of what you "broken" looks like?

andregriffin’s picture

Status:Active» Postponed (maintainer needs more info)
natted’s picture

The problem is likely to be related to the way twitter_bootstrap rewrites the html <input> to <button>.

I haven't investigated in this specific case but suspect it may be similar to the issue at . Also this one is again similar

We could possibly setup a whitelist or configuration option in the theme to resolve this for specific modules incompatible with twitter_bootstrap.

Not sure if any maintainers are around at the moment though. :-)

andregriffin’s picture

Project:Twitter's Bootstrap» Bootstrap Framework
andregriffin’s picture

Project:Bootstrap Framework» Twitter's Bootstrap
natted’s picture

Project:Twitter's Bootstrap» Bootstrap
frankbaele’s picture

Status:Postponed (maintainer needs more info)» Closed (won't fix)
bingorabbit’s picture

mjs2020’s picture

#8 Solved my problem!

mahipal46’s picture

#8 solved me.

pianomansam’s picture

Issue summary:View changes
Status:Closed (won't fix)» Active

I'm not sure why frankbaele marked as Closed Won't Fix without any discussion, because this issue is still outstanding. The solution in #8 does not fix the problem for me, nor does it get to the root cause.

markcarver’s picture

Status:Active» Closed (won't fix)

Because there is an issue in that module to address this. Many times the issues lie with modules being too specific in there JS selectors, which causes breaks amongst theme changes. This makes it their issue, not ours.

yenidem’s picture

How can I apply the code above?
I used it in my template.php file but it did not work, can you please advice about it.

markcarver’s picture

This solution isn't applicable anymore, nor is it being worked on. The closest issue we currently have in the 7.x-3.x branch is the one I'm attaching as a related issue.