[Zope] Form Data Needed in Second Form

Itai Tavor itai@optusnet.com.au
Wed, 1 May 2002 15:41:12 +1000


>Dan Shafer wrote:
>
>I have part of a Zope app written largely as Python scripts linking DTML
>forms that looks conceptually like this:
>
>1. Form A gathers data and then as its action invokes a Python script.
>2. Python Script 1 creates a new DTML document and updates its contents
>based on field data in Form 1.
>3. Python Script 1 then uses RESPONSE.redirect() to open a second DTML
>form, Form 2.
>4. Form 2 needs the name of the document Python Script 1 created as well as
>access to some or all of the data in the fields in Form 1.
>
>What is the best/right/only way to accomplish this goal?
>
>Seems like it should be straight-forward but I've played with several
>promising ideas that turned out to be dead ends. I'm getting a bit desperate.
>
>All help appreciated!

My preferred solution is to call Form 2 in the context of the new 
document. Your Python Script creates 'doc1' and then redirects to 
'doc1/Form2'. Form 2 then has full access to all the data stored in 
the new document.

HTH.
-- 
--
Itai Tavor                      -- "Je sautille, donc je suis."    --
itai@optusnet.com.au            --               - Kermit the Frog --
--                                                                 --
-- "If you haven't got your health, you haven't got anything"      --