Hi there!

In my Drupal 5 website I made a download page with Views and WebFM where all the attachments of all nodes were listed and could be filtered by a cck field or the taxonomy of the node. Then I upgraded to Drupal 6 and I discovered that WebFM does not support Views 2 for the moment.

So I wrote a module that do more or less the same using some MySQL.
The problem is how to replicate the exposed filters. I made a form with Forms API but up to now I haven't manage to export the variables of $form_state['values'] to the page hook in order to update the MySQL query.

What's the right way to do this?

Thanks a lot.
Manuel

Comments

aaustin’s picture

Sorry your question has gone unanswered. I think the problem is that a lot of us are still trying to figure out the new Views API ourselves.

I have found the documentation on the views developers group to be very useful.

http://groups.drupal.org/node/10129

The Views API is a little different than other Drupal APIs and has a steeper learning curve and uses some OOP. But after playing for a little while I have been able to create some very basic filters to get done what I needed. It does look like the API is very thought out and will be extremely powerful once I can get my head around it.

leehunter’s picture

This question was posted twice in the forum so I'm copying the response to the other (duplicate) version of the question so that I can delete the dupe.

This response was from user nevets, not me:

Views as a set of hooks that allow you define among other things filters. So the "proper" way would be to use the hooks. See http://drupal.org/node/235062