[Zope] Problems with Formulator
cyberlync at yahoo.com
Thu Oct 2 15:57:04 EDT 2003
I am a relative zope newbie, and I am tring to use
Formulator to render and validate a input form. For
the most part everything works well, I do however have
two problems. The first problem is that the
form.header() and form.footer() pieces that are shown
in most documentation cause and attribute error. There
is an easy work around, you just put the <form> tags
in yourself. It does, however, lead me to think that I
am missing something somewhere becuase all the docs
use this notation.
The second piece is a bit more problematic. Following
a bit of instruction by the zope labs folks I created
the below script(python). When I try to call it in the
application I get an authorization error. This
generally makes sense considering the constraints zope
puts on scripts, but it does make using a generic
validator a bit more difficult. Does have any
suggestions for a workaround?
Thanks for the input,
from Products.Formulator.Form import
req = context.REQUEST
error = ''
except FormValidationError, e:
for i in e.errors:
title = i.field.get_value('title')
text = i.error_text
error = error + '<b>' + title + '</b>' + text +
error_html = "<b>The following errors were found
in the form:</b>\
<blockquote style=\"color: red; font-size:
13px\">" + error + "</blockquote></p>"
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
More information about the Zope