After two days of searching and debugging I decided to give up and ask help here...

I'm building a multistep form in Drupal 7 with 4 steps. The user_register_form is in the second step. For building this multistep form I used the help of http://www.grasmash.com/article/building-multistep-registration-form-drupal-7. I also did some modifications so other modules that alters the user_register_form would be called. I used the modification from comment http://www.grasmash.com/comment/127#comment-127.

My problem: After submitting the second step, the user_register_submit() function is being called. Although it should move all submit handlers to the $form['next']['#submit'] and call all submit handlers after the last step.

I tried to unravel the whole form handling within Drupal and explore every single function used. I found out that somehow the #submit handler ends up in 'triggering_element', which causes the form to fire the submit handlers directly after step 2 instead of 4 ... but can't figure out how and when this element is set.

Any ideas where to look, or how to investigate this more or better?

Edit: After better reading I came to the conclusion that the way the multi step from grasmash works, is aimed to execute the submit handlers after every step. Although I thought that the submit handlers were moved to $form['next'] so they could be executed in the end. So now I'm wondering how to change the code so all submit handlers will be executed after the last step?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.