Hi: I tried to pass a variable to the the third method. Example: My first DTML 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. 2. I can use Select <select name="varx"> <option value="<dtml-var var>"><dtml-var var> </select> <select name="cubex"> <option value="<dtml-var cube>"><dtml-var cube> </select> in this case i need to change method_3 to insert into cubos (x, xxx) values(varx,cubex). too hard... 3. the solution 1. and 2. is too hard. How a can do it using DTML elegantly? -Jorge
----- 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
participants (2)
-
Jorge Magalhaes -
Kevin Dangoor