[ZPT] Formulator woes...
jules
jules@jules.com
Thu, 13 Dec 2001 20:56:51 -0000
This is driving me nuts! I've had to abandon a couple of ZPT forms and
go back to DMTL to get a project finished.
I tried Evan's suggestion of a script to validate the form
(http://groups.yahoo.com/group/zpt/message/103) but it blows up on the
except line and is unable to find that object. It's just a script,
right? Not an external method?
If I just try an except I then get a blow up in the ZPT with the error
object not being found.
<sigh>
So, I've tired the other suggestion which gets me further. I've got a
DMTL method ripped right out of the howto to validate the form. When
there is an error it returns a nice HTML string to throw into my error
output.
However, when there is no error I'm unable to detect it:
<span tal:define="global my_err here/forward_form_validate" />
<span tal:condition="python:len(str(my_err))!=0" tal:omit-tag="">
Probs:<br/>
'<span tal:replace="structure my_err"/>'
</span>
What might I be doing wrong? I've fiddled with many variations of
python:len(str(my_err))!=0 with no luck.
I'm running the latest 2.4 Zope and latest published ZPT.
Thanks!
Jules