[support] Module using drupal 6 form api

Metzler, David metzlerd at evergreen.edu
Fri Aug 29 19:44:23 UTC 2008


As with most search boxes, what you want to do is to have the submit
handler on the page redirect the user your own search results page, with
the query string on the url.  I know this can be done using drupal_goto
in your submit handler.

The search form should not be in the .tpl file, but in a block hook for
your module. 

Make sense?   

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Praveen Venkatachari
Sent: Thursday, August 28, 2008 4:42 PM
To: support at drupal.org
Subject: [support] Module using drupal 6 form api

I'm trying to develop a module for a site using drupal 6 form api

the site layout has a content block and a right sidebar. The right
sidebar contains a search form (with multiple fields) and the content
block contains the search results.

Its evident what I'm trying to do. I have a search form on the
right-sidebar & once the user submits it, the filtered results show up
on the content block. The content is managed by a page-front.tpl.php.

I need some advise on how I should go about coding the submit handler.
1. Can I manipulate the content block from the module itself ?
2. How can I retrieve the form entry values from page-front.tpl.php ? Is
storing it in a database & retreving later the only option ? If so, how
would I refer to the entry since anyone can use the search form (needn't
be logged in)

thanks

--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list