I have a form which is generated--the user enters his data and submits the form. I run a search based on that, and what I want to do is to show him the same form again (so he can rerun it) with the search results below it.
Whether I use drupal_get_form as the callback or whether I use a custom function that calls drupal_get_form, it seems that me that my form function is called before my validation function, yet its only in the validation function that I see that I have access to $form_values. I can run the search there, but I don't yet see how to add those search results to the page.
I do see that the user module uses $_POST. Is that the recommended method? In my custom function, I can just access the search fields inputted via $_POST, run the search, and then add those results to the form which I generate via drupal_get_form.
I can do it this way, it just seems a bit low-tech for Drupal, heh heh.
Thanks
I have a form which is generated--the user enters his data and submits the form. I run a search based on that, and what I want to do is to show him the same form again (so he can rerun it) with the search results below it.
Hey stupid, why don't you just work more on your Google skills and then check out this article:
http://www.lullabot.com/articles/drupal_5_making_forms_that_display_their_ow...
entitled: Drupal 5: Making forms that display their own results
because that's exactly the question you asked--there is a code sample there, and I can confirm that it works--I just tested it. :)
Thank you.
Sorry.
Please continue to ignore me.