Exposed form don't have class attribute

05/07/2018


In a form_alter, I simply want to add a class to an exposed form (this code works for a custom form) :

$form['#attributes']['class'][] = 'my_class';

But neither my class nor the default class (views-exposed-form, I can see it in $form[‘#attributes’]) is printed in front in the form tag.

Any idea?

قالب وردپرس