By liaolliso on
hey guys,
I met a problem when i want to use the form data in the next form. i search the net and found somebody use $form_state['storage'] to store the values,
but it doesn't get the values as expected.
Need your advice!
Thanks
Comments
Custom Submit then Redirect
Write a form_submit function (see http://api.drupal.org/api/function/example_form_submit/6 for details).
The form_submit will have your user's values stored in the &$form_state parameter. Retrieve the individuals values and build up an http query string (e.g. op=doit&firstName=joe&lastName=smoe).
Use the query string and do an http redirect with drupal_goto
(see http://api.drupal.org/api/function/drupal_goto/6 for details)
Thanks for your reply. But
Thanks for your reply.
But one thing i want to say is that the data passed to next form is too large and maybe it's not proper to pass it by url.
I just want another way to store such data except session.
Maybe this can help?
Maybe this can help? http://drupal.org/node/717750
Arnold French
Drupal Developer/Themer
Promet Solutions Inc.
4001 N. Ravenswood Suite # 503B
Chicago, IL 60613
Drupal Web Development
Hosting
creating form values as POST vars
I'm trying the same thing here, with the only difference that i want to prepare a form (in my case the register form), but i want some values for the fields in the register form te be filled in by my code.
I've read something about the $form['#post'] value to be filled in by an associative array where the keys match the form fieldnames, but all my form fields remain empty.
Does anyone know how to use this $form['#post'] array effectively ?
thanks