I may not be understanding your needs correctly, but I recently did this:<br><br>1. The form builder function switches based on some piece of info in $form_state.<br><br>2. If the info is there, present information. If the information is not there, present a form.<br>
<br>3. The submit function contains onlly $form_state['rebuild'] = TRUE.<br><br>Basically you're giving the form builder function two ways to build the page: With data and without it. <br><br>-Randy<br><br><div class="gmail_quote">
On Mon, May 10, 2010 at 10:37 AM, Bayne, Sam <span dir="ltr"><<a href="mailto:sbayne@sccd.ctc.edu">sbayne@sccd.ctc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm quite frustrated with the Form API right now, so please forgive my tone.<br>
<br>
I've got a form that has a bunch of inputs, all of them multiselects, that allow the user to choose what classes to see in our schedule.<br>
(our class schedule is in an external database). I've got a bunch of code in the form_submit function that builds a very elaborate sql query to get the list of requested classes.<br>
<br>
Unfortunately, the form_submit function is not actually permitted to display anything except through drupal_set_message().<br>
<br>
So I have to either pass my complicated sql query, or all the contents of the form fields to some other page through $form_state['redirect'].<br>
<br>
How do I do that without shoving it all into the querystring?<br>
<br>
Right now, I'm looking at the performance issues of:<br>
<br>
A: storing the query as a string in the database with a query_id, then sending a query_id in the redirect,<br>
B: storing the result of the query in the database with a result_id, then sending a result_id in the redirect.<br>
<br>
Is there some other way to accomplish what I want?<br>
<br>
p.s. I've looked at the search module, it basically shoves the form input into the querystring of the redirect. That'll work for a single input, but multiple array inputs will be a huge pain.<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>