2

I have created a multistep form with five steps using programatically. Is there any way to traverse to first step form the fifth step?
I have created multistep form as given in example module. In the module, each step gives previous and next link only, and I am not able to go to the first step directly from the fifth step.

3
  • 1
    What Drupal version are you using?
    – googletorp
    Apr 21, 2011 at 12:58
  • I am using drupal 6.20 Apr 21, 2011 at 13:57
  • I switch the question from d7 to d6 because of the previous comment.
    – ericduran
    Jun 20, 2011 at 23:04

1 Answer 1

2

The example module uses a value stored in $form_state['storage'] to indicate which step the form is in, when it is being built. You could add a button with a custom submit handler that unsets this value or set it to the value needed for the step you want to show. Also remember to set $form_state['rebuild'] = TRUE;.

On a side note, if you want to make multi step forms, the ctools multi step form wizard API can help you doing a lot of these things for you.

1
  • Where is the documentation for the ctools Form API?
    – Ura
    Oct 11, 2012 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.