[Zope] Calculate values?

Chris Withers chrisw@nipltd.com
Thu, 06 Jul 2000 10:57:25 +0100


Peter Arvidsson wrote:
> 
> I am about to do
> <dtml-call "REQUEST.set('a', (a - b) * 15">

I presume that should be:
<dtml-call "REQUEST.set('a', (a - b) * 15)">
? ;-)

Anyway, two options:

1. On your form, change your input to be:
<input type="TEXT" name="a:int">

2. Change your call to be:
<dtml-call "REQUEST.set('a', (_.int(a) - _.int(b)) * 15)">

cheers,

Chris