I am using the bootstrap Tweme theme and would like to show tooltips when hovering over exposed filters (e.g. haslanguagecertificate) in a view. When hovering over profile edit fields the help text is shown properly.
I have also added the snippet in html.tpl.php before the closing < / body>.
(function($) {
$(document).ready(function() {
$('[data-toggle=tooltip]').tooltip();
});
})(jQuery);
This has How to show tooltips on form labels based on view filter descriptions in a Bootstrap sub-theme? that helped, but the tooltips are not showing up. Devel does not show ['title']['#attributes'] - what do i have to write here?
/**
* Implements hook_form_FORM_ID_alter().
*/
function customisations_form_views_exposed_form_alter(&$form, &$form_state, $form_id) {
dpm($form);
// $field_name = 'filter-title';
$field_name = 'filter-field_haslanguagecertificate_value';
$form['title']['#attributes'] = array(
'data-toggle' => 'tooltip',
'data-original-title' => $form['#info'][$field_name]['description']
);
$form['#info'][$field_name]['description'] = '';
}