> I want to select from a select menu, 3 amounts: 1000, 5000 or 10000. After
> this, the form action method should reply:
> - "this is not much" if 1000 was selected,
> - "this is ok" if 5000 was selected,
> - "this is very much" if 10000 was selected
> Now my form method looks like this:
> <form action="form_action">
> How many money?
> <select name="money">
> <input type="submit" value="checkit">
> and the form_action method is this:
> <dtml-in money>
> <dtml-if "1000">
> This is not much!
> <dtml-if "5000">
> This is ok!
> <dtml-if "10000">
> This is very much!
> I am sure that there is an error in my thinking of these tags.
The <dtml-in> is not right. Use dtml-in if you want to iterate over
lists. So in your case you should try:
This is not much!
This is ok!
This is very much!
(or use <dtml-elif> in this case)
This now makes a string compare as usually form parameters will be passed
as strings if you don't tell Zope to do it different. In order to e.g. let
it pass integers, you might try in the form:
Then you can say <dtml-if "money==1000">, etc.
More information about this "type casting" feature can be found at
communication & design [EMAIL PROTECTED]
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -