By jcarreer on
I haven't found many examples of multistep forms in Drupal 6. I know they implement a new system for this in 6 but I have yet to stumble across any information about it outside of the Drupal API, which is not always as descriptive as I would like. Any help would be appreciated.
Comments
I am having the same
I am having the same problem!
I found some good D5 guides, but I need something for D6!
Hopefully this will be
Hopefully this will be helpful, if you haven't stumbled acrossed it already.
http://drupal.org/node/144132#multistep
-Craig Jackson
-Web Developer
Thanks Craig - however I
Thanks Craig - however I already saw that and it doesnt really give a good example of how to do a multi step form.
I don't have time to test
I don't have time to test this. But, looking over the last link I gave you. Can you increment a $form_state['step']++ each time the form gets submitted. And then place the 'step' as a value in the form to be passed to submit again to be incremented. Just set step equal to 1 if (empty($form_state['step'])) on the form creation function. It looks like drupal will pass the $form_state variable from submit to the creation form, as long as you don't redirect the user. Let me know if this works.
-Craig Jackson
-Web Developer
did you figure something out?
jcarreer- did you find any examples of multi-step forms for Drupal 6? do you have one to offer?
Check out Andrew Yager's
Check out Andrew Yager's post for a simple multistep form example for Drupal 6.
http://www.andrewyager.com/content/view/51/27/
Updated url
Here is the updated url to his blogpost about multi-step forms:
http://www.andrewyager.com/blog/2008-06-03/drupal-6-multistep-forms
multistep form example
Not satisfied with any of the above examples, I made my own, simplest possible multistep form example
Multistep form example
A very good example: http://drupal.org/project/examples
yes it is
yes it is a complete functional example of multistep form in drupal 6
checkbox limit
Is there a way to limit the checkbox option to example max 2 or 3. Like te #required option.
$form['questions']['q0'] = array(
'#type' => 'checkboxes',
'#title' => '',//t('Dit vind ik mooi'),
'#default_value' => $_SESSION['woonid']['q0'],
'#options' => array()
);