Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2008 at 22:05 UTC
Updated:
20 Sep 2008 at 21:31 UTC
I am using your code from here: "Exposed filters" expose too much
function theme_views_display_filters_VIEWNAME($view) {
$form = views_filters_form($view);
// filter1 or filter2 or filter3 depending on which filter you need
$options = $form['filter1']['#options'];
// ... code to remove options you don't want ...
// example
foreach ($options as $option => $text) {
if (!in_array($option, array('page', 'blog', 'story'))) {
unset($options[$option]);
}
}
$form['filter1']['#options'] = $options;
return drupal_get_form("views_filters_$view->name", $form, 'views_filters');
}
How could I change the default value if I "removed" the previous default value with this code?
thank you , drupalfo
Comments
Comment #1
sunSorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support. Additionally, the answer to your question might be covered in the handbooks at http://drupal.org/handbook/modules/views already.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.