How to add a form to a view using Drupal 6.x views 2?

I want to add a drupal form to the top of the view. The view does not need to get the results of the form, but the hook_submit of the form should be able to read the first argument of the view in which the form was included.

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

+3
source share
1 answer

It seems like you need a hook

_views_pre_view

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

+2
source

Source: https://habr.com/ru/post/1698693/


All Articles