Index: openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp,v diff -u -r1.6.2.4 -r1.6.2.5 --- openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp 6 Jun 2023 09:30:30 -0000 1.6.2.4 +++ openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp 13 Jul 2023 12:48:33 -0000 1.6.2.5 @@ -6,15 +6,17 @@
ex. ++ex. template::wizard create -action "wizard" -name my_wizard -params { my_param1 my_param2 } -steps { 1 -label "Step 1" -url "step1" 2 -label "Step 2" -url "step2" 3 -label "Step 3" -url "step3" } -
ex. ++ex. <include src="\@wizard:current_url\@"> -+ +
template::wizard submit myform -buttons {back next} -+ + On the last step you may want to use the following on step3.tcl
template::wizard submit myform -buttons {back next} -+ + The following values are acceptable for the buttons: back, next and finish. Back buttons are not rendered if the step is the first step, like wise next buttons are not displayed if its the last @@ -71,7 +77,8 @@ \@wizard.label\@ <br> </else> </multiple> - + +
Use "template::wizard set_param myparam_name" to set it. Normally you place this in the steps of the wizard where the @@ -92,23 +99,27 @@ 2 -label "Step 2" -url "step2" 3 -label "Step 3" -url "step3" } - + + You can access my_param1 and/or my_param2 on any step1.tcl, step2.tcl, or step3.tcl by using "ad_page_contract" or "template::wizard get_param" -
ex. +or+ex. ad_page_contract { gets the wizard params } { my_param1 my_param2 } -+ +
set my_param1 [template::wizard get_param my_param1] set my_param2 [template::wizard get_param my_param2] -+ + Note: "template::wizard get_param" has the advantage of getting the param value during the response time. What does this mean? It will properly get the current value of the param which was @@ -127,7 +138,8 @@ \@wizard.label\@ <br> </a> </multiple> - + + Note: that this is not a very wise thing to do especially if the latter steps will depend on the inputs from the earlier steps. You can however do checking on each step.