[Zope] to pass a variable to the third method

Jorge Magalhaes jmagalhaes@eng.uminho.pt
Tue, 25 Apr 2000 14:51:56 +0100 (WET)



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