[Zope] sessions and dtml problem

Ben Avery ben@thesite.org.uk
Wed, 12 Jun 2002 20:22:49 +0100


Hi,

I'm a bit of a newbie, but using Zope for a big project, and getting there,
but struggling with some of the details, in this case the session object and
the dtml namespace.

I have a form which gets submitted to a python script which first pushes the
form object into the session, does some form validation, and if any fields
don't match the validation criteria, then the form is revisited until
correct.

I want to reuse the same DTML method to display and populate the form, so
the first time, I use a <dtml-in [ZSQL method]> [form] </dtml-in> construct
to give access to the fields.
Now when I revisit the form, I want to use the form I previously put into
the session to populate the fields.

I've tried using things like 
<dtml-with expr="SESSION.get('co_reg_form')"> [form] </dtml-with> 
and what must be a million permutations with all the dtml constructs! all to
no avail.
I really want to put some construct around the form, and just access
<dtml-var first_name> etc inside, the same as with the <dmtl-in [zsql
method]>.

could someone be kind enough highlight the point(s) at which I'm being
stupid? =)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Avery                  YouthNet UK