If trying to use a Views module exposed filter set to use radio buttons, the Bootstrap theme will alter the html structure of those elements and remove the elements to achieve a traditional Bootstrap structure. This causes the Views AJAX routines NOT to get triggered when the buttons are clicked, and thus not work.

I didn't dig too far in to the cause, but what I do know is that the tags are removed in bootstrap_form_element() in form-element.func.php if the input type is "radio." My workaround was to create a hook_form_element() in my custom module and change the element type to "radio_exposed_filter" or something other than radio. Then just return bootstrap_form_element() at the end.

My quick and dirty workaround in hook_form_element():

$element = &$variables['element'];

if ('radio' == $element['#type'] && false !== strpos($element['#id'], 'edit-field-category-value')) {
    $element['#type'] = 'radio_exposed_filter';
}

return bootstrap_form_element($variables);

Comments

jpvivere created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (cannot reproduce)

I haven't seen anything like this and I've themed/built quite a few sites using Views + AJAX + Bootstrap.

Just the fact that you're invoking bootstrap_form_element() directly and that no one else has chimed in for a year old issue on something that would affect quite a few sites indicates to me that the problem lies elsewhere. Perhaps in custom/site specific code.