0

I have a View where i show some exposed filters; i would like to apply a particular CSS class only to a specific exposed filter. I have seen that if i copy the views-exposed-form.tpl.php inside my theme directory and call it views-exposed-form--MYFORMNAME.tpl.php i can control the html code; i don't think it s a good thing to put code with

 if($widget->id==MYID) {}

inside the template ... which is the correct way to assign a style to an exposed filter?

1

Not sure if you need the template for other reasons, but you can style it directly with CSS, using the ID. See screenshot. I happen to be using Better Exposed Filters module, which provides some nice extras controls.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.