Drupal How to Theme a Views Exposed Filter Form
Category:
To theme the exposed filter form on a view in Drupal:
- Copy sites/all/modules/views/theme/views-exposed-form.tpl.php to sites/all/themes/MY_THEME/views-exposed-form--MY-VIEW-NAME.tpl.php
- Use the views admin UI to rescan the template files
- Basic Settings -> Theme Information -> Rescan Template Files
- Note: it won't show your new template file in the list
- Save your view
If you need more fine tuned methods of modifying the actual form, then use hook_form_alter instead. Here is an example: http://tylerfrankenstein.com/code/drupal-alter-views-exposed-filter-form
Comments
Miguel (not verified)
Mon, 04/29/2013 - 17:45
Permalink
Hi Tyler, theme for sharing
Hi Tyler, theme for sharing this tip.
You can say me how i can make to convert the form select to simple div or span to theme it with css?
Example:
field set in select. To. Div/ul
term1. Div1/li
Term2. Div2/li
term3. Div3/li
Very this for You time.
see You
Sergey (not verified)
Sun, 04/05/2015 - 16:19
Permalink
Views exposed form layout
Views exposed form layout module must help you.