I have a Views exposed filter, for which I am trying to add a class via hook_form_alter()
with the following code:
$form['price']['#attributes'] = array('class' => array('price-hide'));
Outputting the form array with devel shows that this is adding the attribute fine; however I can only assume there is another hook_form_alter()
running after my module that is wiping my attributes, as other attributes are being added, and mine never make it to the HTML output.
I've tried moving from hook_form_alter()
to hook_form_views_exposed_form_alter()
since I remember that hook running at a different time than hook_form_alter()
; however, this doesn't seem to make any difference.