Closed (outdated)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 May 2012 at 11:48 UTC
Updated:
20 Jul 2026 at 18:37 UTC
Jump to comment: Most recent
Comments
Comment #0.0
kenorb commentedimproved sentence
Comment #1
kenorb commentedI've fixed by following code in my foo_form_info():
It works!:)
Please re-open if there is any other easier solution.
Comment #2
merlinofchaos commentedThat is one of two possible solutions.
the other solution is that in formxxx_submit you can set $form_state['triggering_element']['#next'] = 'step' I think.
It might be $form_state['next'], I can't remember exactly now.
This is something that should be in the wizard documentation if it's not already; manipulating the flow programmatically is a key feature.
Comment #3
kenorb commentedThank you, I'll have a look.
Comment #4
merlinofchaos commentedIn fact, I'm going to re-open this as a documentation issue. This absolutely deserves a section in help/wizard.html discussing how to control the flow.
Comment #6
kenorb commentedComment #7
merlinofchaos commentedHm. This should be active, not closed or postponed.
Comment #8
kristiaanvandeneyndeBased on line #432 in includes/wizard.inc, the value to change is
$form_state['clicked_button']['#next']Example code that worked for me:
Comment #9
jbiechele commentedThe solution in #8 from kristiaanvandeneynde works fine for the "Next" button. I assumed that this solution should also apply to "Back", but this is not so, or I'm doing something wrong.
For the "Back" button to skip a step I have to specify an explicit $form_state['redirect'] = 'my_redirect_path' in function celer_solicitud_wizard_next() to get this working.
Any idea why setting $form_state['clicked_button']['#next'] = 'step-something' does not work in the case of clicking the "Back" button?
Comment #10
merlinofchaos commentedHm. It should work; that button also uses #next to determine where to go.
Can you be certain your code is actually executing?
Comment #11
merlinofchaos commentedIn fact, that seems like a likely issue, because a _submit hook won't be called when 'back' is clicked. You could use a _validate callback instead, I think.
Comment #11.0
merlinofchaos commentedadded dash
Comment #12
kenorb commentedComment #13
japerryDrupal 7 is no longer supported, closing.