[ZPT] Re: tal:define and tal:condition nesting

Evan Simpson evan@4-am.com
Thu, 10 Oct 2002 12:45:45 -0500


Sebastian Stark wrote:
> <input type="radio" name="q1" value="2"> 2
...
>   <span tal:define="r request/form/q1"
>         tal:condition="python:r==4">

The way this is set up, request/form/q1 will contain the string "4", not 
  the integer 4.  You need to change the input name to "q1:int", or else 
change the tal:condition to either "python:int(r)==4" or "python:r=='4'".

Cheers,

Evan @ 4-am