This message might be better for the development list rather than the support list.

Would crafting the entire form as a single multi-step work for you? Consider this example: http://www.benjeavons.com/multi-step-forms-drupal-6-using-variable-functions

On Mon, Nov 22, 2010 at 4:31 PM, Doug <doug.duboulay@gmail.com> wrote:
Writing a D6 module.
I'm trying to build a lengthy form, where at some point, towards
the bottom of the form, it would be nice to
(1) optionally hit an 'incomplete'/branch submit handler,
(2) cache the interim curent form state,
(3) double redirect to a new form (create submit ) etc
(4) bounce back to the original (with second redirect),
(5) reload interim state from the cache,
(6) amend with new details gleaned from the intermediate/branch form,
(7) finally proceed to the "complete" form submit handler of original form

Currently I can double redirect to a second form, but on bounce back,
all the original details are lost, which is really unintuitive to
the user, who thinks they've already filled out that part.

I guess I need to do something like this:

function mymodule_interim_submit($form, &$form_state) {
 $form_build_id = $form_state['values]['form_build_id'];
 unset($form_state['submitted']);
 unset($form_state['storage']);  // $form_state['rebuild'] = FALSE;
 $form_state['saved']= $form_state['values];
 $form_state['redirect'] = array (   // double redirect
    'mymodule/intermediate_form',
    'mymodule/this_form/' . $form_build_id
 );
}

But I don't know if thats sufficient to preserve the interim state
of the form, or will it still be deleted from the cache after
the interim_submit completes, or ...(barking up wrong tree)?

thanks
Doug
--
[ Drupal support list | http://lists.drupal.org/ ]