[Zope-PTK] Wizards

Andrew M. Kuchling akuchlin@mems-exchange.org
Tue, 21 Mar 2000 17:39:55 -0500 (EST)


Back in February, Paul Everitt tried to raise a discussion about
wizards (see
http://lists.zope.org/pipermail/zope-ptk/2000-February/000361.html for
the original post) but there was little interest.

I'd like to re-raise the issue, outside of the PTK, because the idea
of wizards is useful outside of the PTK; consider a site with a
multi-stage registration process where you have to fill out several
screens of info.  Right now the Wizard ZClass is hiding inside the
DemoPortal export file, but it might be worth promoting it into a
standard component of Zope.

Currently Wizards are really simple; they're Folderish objects that
can contain a bunch of DTML methods.  The methods are sorted by ID to
produce the order in which they're traversed; for example, if you have
methods named 'a', 'b', 'd', they'll be shown in that order.  Each
method can contain <INPUT> tags, and the wizard will collect all the
form inputs, hiding them in hidden variables in subsequent pages.  

Some requirements I can think of:

     * You want to be able to sanity-check the fields after each step,
staying at the same step until the fields have reasonable values.

     * Putting values inside hidden fields won't work well if one of
the fields is large -- say, a 200K uploaded file.  Better to keep a
server-side session that holds the field values.  (I think some sort
of standard session tracking, or a standard hook for sessions, should
be part of Zope, but that's a separate issue.)

What other requirements would there be?  Does anyone have other 
potential applications for Wizards?

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
What does it mean, huh? What does it mean when those kids die so...
pointlessly? It doesn't mean anything, does it? That's the scary part. If it
meant something, you could handle it, but it doesn't.
    -- Titus Bird, in ENIGMA #4: "And Then What?"