I'm trying to build a form to search The intro page shows the search form, and bellow, a grid When the user set some fields, and click OK, the grid must show the filtered result There is any node in drupal.org about it? I'm fighting with some weird problems, like after click OK, the hole browser shows nothing, blank! I figured out that the drupal_get_form() from my _form function cause that problem, if I just show the grid (no search form), the blank problem do not hepend. TIA for any tip Thanks Feijó
Not yet, I will Thanks baita abraço Feijó ----- Original Message ----- From: "domas" <domas.m@gmail.com> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 7:09 AM Subject: Re: [development] custom search form
Hi, have you looked at the views_fastsearch module?
Domas
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? Thanks baita abraço Feijó ----- Original Message ----- From: "domas" <domas.m@gmail.com> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 7:09 AM Subject: Re: [development] custom search form
Hi, have you looked at the views_fastsearch module?
Domas
Quoting Feijó <patrao@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/
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@users.sourceforge.net> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 10:49 AM Subject: Re: [development] custom search form Quoting Feijó <patrao@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/
So if you want to replace the search for that normally gets themed in the header, implement search_theme_form. This is the second time I've had to tell someone this today. There doesn't appear to be an api page on it :( But you can see my example as it relates to VFS http://drupal.org/node/189531 (I know you don't want to use VFS, but the example still applies, just return $form). 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@users.sourceforge.net> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 10:49 AM Subject: Re: [development] custom search form
Quoting Feijó <patrao@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/
-- Doug Green douggreen@douggreenconsulting.com 904-583-3342 Bringing Ideas to Life with Software Artistry and Invention...
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@users.sourceforge.net> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 10:49 AM Subject: Re: [development] custom search form
Quoting Feijó <patrao@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.
promissing that article!! Thanks, I'm reading it all and will give a try :) Feijó ----- Original Message ----- From: "Richard Morse" <remorse@partners.org> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 1:16 PM Subject: Re: [development] custom search form 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ó
Feijó wrote:
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?
Chapter 12 of Pro Drupal Development covers what it sounds like you want to do. Mark
ouch I bought it last week, but take a long time to get here in Brazil :( I guess I will have to insist googling all possibilities that come into my mind, the problem is I'm runing out of ideas of words to look for (filter, hook, form, search, custom, ...) Feijó ----- Original Message ----- From: "Mark Jordan" <mjordan@sfu.ca> To: <development@drupal.org> Sent: Tuesday, November 06, 2007 1:24 PM Subject: Re: [development] custom search form
Feijo wrote:
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?
Chapter 12 of Pro Drupal Development covers what it sounds like you want to do.
Mark
participants (7)
-
Alessandro Feijó -
domas -
Doug Green -
Earnie Boyd -
Feijó -
Mark Jordan -
Richard Morse