This message might be better for the development list rather than the support list.<br><br>Would crafting the entire form as a single multi-step work for you? Consider this example: <a href="http://www.benjeavons.com/multi-step-forms-drupal-6-using-variable-functions">http://www.benjeavons.com/multi-step-forms-drupal-6-using-variable-functions</a><br>
<br><div class="gmail_quote">On Mon, Nov 22, 2010 at 4:31 PM, Doug <span dir="ltr">&lt;<a href="mailto:doug.duboulay@gmail.com">doug.duboulay@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Writing a D6 module.<br>
I&#39;m trying to build a lengthy form, where at some point, towards<br>
the bottom of the form, it would be nice to<br>
(1) optionally hit an &#39;incomplete&#39;/branch submit handler,<br>
(2) cache the interim curent form state,<br>
(3) double redirect to a new form (create submit ) etc<br>
(4) bounce back to the original (with second redirect),<br>
(5) reload interim state from the cache,<br>
(6) amend with new details gleaned from the intermediate/branch form,<br>
(7) finally proceed to the &quot;complete&quot; form submit handler of original form<br>
<br>
Currently I can double redirect to a second form, but on bounce back,<br>
all the original details are lost, which is really unintuitive to<br>
the user, who thinks they&#39;ve already filled out that part.<br>
<br>
I guess I need to do something like this:<br>
<br>
function mymodule_interim_submit($form, &amp;$form_state) {<br>
  $form_build_id = $form_state[&#39;values][&#39;form_build_id&#39;];<br>
  unset($form_state[&#39;submitted&#39;]);<br>
  unset($form_state[&#39;storage&#39;]);  // $form_state[&#39;rebuild&#39;] = FALSE;<br>
  $form_state[&#39;saved&#39;]= $form_state[&#39;values];<br>
  $form_state[&#39;redirect&#39;] = array (   // double redirect<br>
     &#39;mymodule/intermediate_form&#39;,<br>
     &#39;mymodule/this_form/&#39; . $form_build_id<br>
  );<br>
}<br>
<br>
But I don&#39;t know if thats sufficient to preserve the interim state<br>
of the form, or will it still be deleted from the cache after<br>
the interim_submit completes, or ...(barking up wrong tree)?<br>
<br>
thanks<br>
Doug<br>
<font color="#888888">--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br>