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
On Wed, 2002-06-12 at 15:22, Ben Avery wrote:
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.
When you say "a python script pushes the form object into the session", what exactly does this code look like?
participants (2)
-
Ben Avery -
Chris McDonough