UPDATE: Option to use fieldsets.
vangorra - May 29, 2007 - 22:40
| Project: | Views Filter Block |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Some themes place border around fieldsets and make then collapsible. It would be nice if we had the option in the admin setting page to disable the encapsulating fieldset tags.
The included patch will do this. Hopefully you will include it in a new release.
| Attachment | Size |
|---|---|
| usefieldset.patch | 3.25 KB |

#1
Sorry, looks like there was an issue with overwriting the field title when the original form provided more than 1 field. This should do it.
#2
I've been looking around for this. But I'm a real newbie to drupal, can anyone explain how I use this patch? I've been looking at the drupal handbook but I'm getting really confused. Do I need to be hosting Drupal on my own computer to apply the patch? Cuz right now I'm using paid hosting.
THanks!
#3
Nevermind, I just found this http://drupal.org/node/169051
Hope it helps anyone else who is looking to remove fieldsets!
#4
Alternatively, you could simply use this snippet of code in a theme override called phptemplate_views_filterblock:
foreach ($view->exposed_filter as $count => $filter) {$newform["fieldset$count"] = array(
'#type' => 'fieldset',
'#title' => $filter['label'],
'#collapsible' => false, // don't want the form to collapse - ead 6.12.08
'#weight' => $count - 1000, // we'll never have this many filters
);
$newform["fieldset$count"]['#collapsed'] = false; // don't want the form to collapse - ead 6.12.08
}
Note that I believe you'll have to include the rest of the function as it is written in the module for this to work.
I just changed the module myself, since I don't ever want the fieldsets to be collapsible & I already have too many things in my template.php file :)