[Zope] Tal:condition problem
Chris Withers
chrisw@nipltd.com
Tue, 20 Aug 2002 17:19:13 +0100
zope wrote:
> exceptions.KeyError on id in "<PythonExpr request.form['id'] == 't' or
> nothing>"
> -------------------------------------------------------^
> Could you tell me how I can rewrite this so that the first time the page is
> loaded even if there is no value for "id" the page will be shown .
> And only if I pass a form variable it should execute.
Try replacing "request.form['id'] == 't' or nothing" with:
request.form.get(id')=='t'
cheers,
Chris