I am trying to find a way to display tooltips when a user hovers the mouse over a filter label of a views search page. Preferably, to reduce hard-coding, I would like to take into advantage the filter description and get the tooltip text from there (and subsequently hide descriptions through css).
Also the best way I found to actually activate the tooltips in Bootstrap is to add the attribute data-toggle="tooltip"
to the element that we need to show a tooltip for.
So far I am using the recipe from here adding the data-toggle
element
function mytheme_form_element($variables){
dpm($variables);
$original = theme_form_element($variables);
$return = '<div data-toggle="tooltip">' . $original . '</div>';
return $return;
}
but I don't see the filter description anywhere in the $variables
array plus this snippet themes the filter field and not the label but would probably do the trick.