tags:

views:

1315

answers:

1

I want to add a drupal form to the top of a view. The view does not need to receive the results of the form but the _submit hook of the form should be able to read the first argument of the view that the form was on.

Where is the best place to add this? Custom module or template file and what are the necessary filenames/hooks?

A: 

It appears the hook you want is

_views_pre_view

with variables $view, $display_id, $args and you want to set $view->attachment_before to equal the form.

Steven Noble