Using views, I've exposed a number of filters. I'd now like to group exposed form elements into collapsible fieldsets. So far I'd been using hook_form_alter() to successfully change form types to checkboxes. As I now understand, hook_form_alter() only lets you change the details of each form, not to change the hierarchy of the form elements.

I've been referred to drupal_alter(). As I understand, it allows you to hook directly into an exposed form and alter it rather than using form_alter(). So drupal_alter isn't a hook point, it allows a module writer to create a hook point.

Would I first create a hook point and then use it?

I'm still confused about its usage syntax. How would I create such a hook point? I've also been warned that I may need to implement a form_submit function which maps the formset elements to the formset array, and then to unset the original form elements from the original array.

I haven't found much if any documentation on the usage of drupal_alter(), other than http://thesecrethandshake.wordpress.com/2009/03/08/more-notes-from-drupa...

Comments

flips’s picture

Hi,

I also would like to group exposed form filters (elements) into fieldsets. Did you manage to do it ?