exposed filters

Posted by: 
Dominique De Cooman

We ll do this with an example as usual.

We have a table with book entries forming a top 100 which gets and update every week. Each entry has a current position, a last week position, a corresponding node id and a week.
We ll create a file in called book_top100.views.inc, in that file we ll implement hook_views_data() and a hook_views_handlers().

Posted by: 
Dominique De Cooman

Our example: we try to set the default value for a filter on a certain week.

I tried to set the default value of your exposed filter in:

<?php
$form
['week']['#default_value'];
?>

Didnt work.
In get forms you need to set the $form_state['input']['week']. Also you need to make sure the value isnt submitted yet so check on $_GET['week'] to get the actual value.

Subscribe to exposed filters