[Zope] to pass a variable to the third method

Kevin Dangoor kid@kendermedia.com
Tue, 25 Apr 2000 10:43:22 -0400


----- Original Message -----
From: "Jorge Magalhaes" <root@predict.telepac.pt>
To: <zope@zope.org>
Sent: Tuesday, April 25, 2000 9:51 AM
Subject: [Zope] to pass a variable to the third method


> method_1 (the form)
>
> ...
> <form action="method_2">
> <input name="var">
> <input type="Submit" value="OK">
> </form>
> ...
>
> method_2 (the action and another form>
> ...
> <form action="method_3">
> <dtml-let
> cube="var*var*var">
> <p> The cube of <dtml-var var> is <dtml-var cube> </p>
> [main_problem]
> </dtml-let>
> <input type="submit" value="Save?">
> </form>
> ...
>
> method_3 (insert in the db)
>
> insert into cubos (x, xxx) values(var,cube).
>
> My problem is build [main_problem]. I know that can be:
>
> 1. <input name="varx" value="<dtml-var var>"><input name="cubex"
value="<dtml-var cube>">
>
> in this case i need to change method_3 to
>
> insert into cubos (x, xxx) values(varx,cubex). Anybody can chance the
value of thes variables. This isn't a good solution.

How about <input type="hidden" name="varx" value="<dtml-var var>"><input
type="hidden" name="cubex" value="<dtml-var cube>">
?

By the way, you could just do <input type="hidden" name="var"...
if you want to. There's nothing that says you have to change those variable
names for the posting of that form.

Kevin