[development] custom search form

Richard Morse remorse at partners.org
Tue Nov 6 15:16:15 UTC 2007


I don't know for sure if this is what you're looking for, but I may  
have solved the problem you're looking at. Look at the module  
site_user_list, which implements a form that allows you to search the  
list of users, and displays the results.

Also, you might want to look at:
http://www.lullabot.com/articles/ 
drupal_5_making_forms_that_display_their_own_results

which describes another way to achieve the same kind of result.

HTH,
Ricky

On Nov 6, 2007, at 8:15 AM, Feijó wrote:

> I did read all information about *_search hooks
>
> I found that line "If your module needs to provide a more  
> complicated search form, then you need to implement it yourself  
> without hook_search(). In that case, you should define it as a  
> local task (tab) under the /search page (e.g. /search/mymodule) so  
> that users can easily find it." in http://api.drupal.org/api/group/ 
> search/5
>
> Thats my case, I'm not working in nodes!! I'm integrating  
> information stored in Firebird, its almost another site, old one,  
> and I'm updating it inside drupal, to centralize all information on  
> my intranet.
>
> I simple need a Form (already built) to send the data after click  
> on Submit, that data need to be recieved it in some place... where?  
> I have to work with $_POST[] ? Or there it is a better drupal way?
>
> Here something I did:
>
>
> function mymodule_myfunc($id='') {
>
>  if (!$_POST['ok'])  // if I remove this if, after submit, the page  
> gets blank!
>    $content .= drupal_get_form('mymodule_myfunc_form');
>
>  $content .= theme_table($header, $rows);
>  return $content;
> }
>
> function mymodule_myfunc_form_submit($form_id, $form_values) {
>  drupal_set_message(print_r($form_values,1));  // just to see  
> something
>  //return 'test';
> }
>
>
>
> Thanks
>
>
> baita abraço
> Feijó
>
>
>
> ----- Original Message ----- From: "Earnie Boyd"  
> <earnie at users.sourceforge.net>
> To: <development at drupal.org>
> Sent: Tuesday, November 06, 2007 10:49 AM
> Subject: Re: [development] custom search form
>
>
> Quoting Feijó <patrao at legendas.feijo.info>:
>
>> Hi Domas,
>>
>>
>> I just looked at views_fastsearch
>>
>> I cant use that, I cant use views.  I need to implement my own  
>> form and my own search (set the SQL with values from the form, get  
>> the result and show as a theme_form).
>>
>> Can you or someone in this group can point me the direction?
>>
>
> http://api.drupal.org/api/function/hook_search/5
>
> If you start typing the word ``search'' in the search box on the API
> documentation page you'll get a list of a few more items to look at.
>
> Earnie -- http://for-my-kids.com/
> -- http://give-me-an-offer.com/
>


The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this information in error, please contact the Compliance HelpLine at 800-856-1983 and properly dispose of this information.


More information about the development mailing list