[Zope] What am I doing wrong?
Jim Washington
jwashin@vt.edu
Thu, 29 Apr 1999 11:29:33 -0400
Tom Deprez wrote:
>
> Still I've three problems :
>
> 1. This part is the one :
>
> when checkbox 'inputhumour' is checked everything works fine. If it
> isn't---> error (the site is currently experiencing ..... )
>
> <!--#if expr="inputhumour"-->
> Great day isn't it?
> <!--#else-->
> Did you had a bad day?
> <!--#/if-->
>
> inputhumour==true or inputhumour=1 gives also problems...
got that prev msg. You are welcome.
> 2. If the age is wrong (<0 or >120) I let the user go back to the form.
> Problem: the values are gone. How can I let the user go back so that
> his/her entered values are still there?
Assuming you are going back to the same form, it can be constructed with
something like:
<input name="age" type="text"
<!--#if age-->
value="<!--#var age-->"
<!--#/if-->
>
> 3. If the user has entered text in the form, I get a form explaining that
> it has to be an integer. Can I intercept this and show my own page (other
> language, more info,...)
Here's a hint:
<!--#if "age[0] in _.string.digits"-->
<!--#if "0 <= _.string.atoi(age) <=120"-->
-- Jim Washington