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.4 -r1.5 --- openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp 22 Apr 2018 18:11:00 -0000 1.4 +++ openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp 25 Apr 2018 08:42:18 -0000 1.5 @@ -6,17 +6,15 @@
-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 @@ -77,8 +71,7 @@ \@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 @@ -99,27 +92,23 @@ 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. +orex. 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 @@ -138,8 +127,7 @@ \@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.