So I added some custom tables which I intend, on an ongoing basis, to populate with batch processes. I intend for my users to be able to search these tables via a search form on my site.

I created a block module that enables the simplest and most frequent search available from a sidebar no matter what page they are on. I want to create an "advanced search" page that enables various permutations via a form, but I'm just not understanding how to do that.

Following my original conception, I created a node module that would only ever create one node - the advanced search page. I came to understand, however, that the form generated via hook_form was only presented at node creation time (via Create Content), rather than upon node viewing.

So how do I create a page that provides a form-based interface to my custom tables?

Also, once I've created the search page, is the Views module the appropriate tool for presentation of the resultant data?

Thanks for your help.

Comments

deekayen’s picture

Create a new content type using CCK and add fields to it that match what you need for your custom purposes. Then you can use the built in search engine or one of the other custom ones that already know how to search through the CCK content tables.

Then instead of worrying about how to search, you instead just change the way to commit data to the custom content types. Instead of using SQL to do the insert, you'll just build an object that you can send through drupal_execute() or node_save() to insert the data on your batch processes.