Index: openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.html 30 Sep 2003 12:04:22 -0000 1.1 @@ -0,0 +1,199 @@ + + + + +Using the Wizard + + +

Overview Of How To Make A Wizard

+ +
    +
  1. Create a wizard file (ex. wizard.tcl) that contains the "template::wizard create" code. +
    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"
    +       }
    +    
    + +
  2. + +
  3. Add the "template::wizard get_current_step" on wizard.tcl. + Make sure that you call any "template::wizard set_param" if needed before + calling get_current_step. get_current_step will redirect to the wizard -action + properly setting all -params value and its other needed http state vars

    + +

    Note: the wizard will rewrite the url always. Only self submitting forms + are preserved. Once the form is finished processing the wizard will take + over and rewrite the url.

    +
  4. + +
  5. Create the wizard template file (ex. wizard.adp). This file will include + the file based current step of the wizard +
    ex.
    +       <include src="@wizard:current_url@">
    +    
    +
  6. + +
  7. Create the individual steps, these are just normal tcl and/or adp files. + So make a step1.tcl, step1.adp, step2.tcl, step2.adp, step3.tcl and step3.adp. + Normally this files are self submitting forms +
  8. + +
  9. Add "template:wizard forward" on each step (eg. step1.tcl, step2.tcl, step3.tcl) + , usually the code where the step is processed and successful. +
  10. + +
  11. On each step add the wizard buttons on the .tcl files. Ex. step1.tcl will + include +
    +    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 step. Finish can appear on any step + and will finish the current wizard even if not all steps are done. +
  12. + +
+ + +

Tips And How To Use The Wizard

+ + + + + + + Index: openacs-4/packages/acs-templating/www/doc/guide/wizards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/wizards.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/doc/guide/wizards.html 13 Sep 2002 16:46:31 -0000 1.2 +++ openacs-4/packages/acs-templating/www/doc/guide/wizards.html 30 Sep 2003 12:04:22 -0000 1.3 @@ -10,6 +10,8 @@

This document outlines the steps necessary to build a dynamic form wizard in Tcl code.

+Updated documentation of wizards +

Create a wizard

Use the wizard create command to initialize a wizard, declaring