[Zope] Still Chipping Away At Formulator/ZPT Interface
Clemens Robbenhaar
zope@zope.org
Wed, 6 Nov 2002 01:19:52 +0100
beno writes:
[...]
> > Actually You want to verify the submitted form data first, then read
> >out the data to do something, I guess.
> >
> >This looks like:
> >
> >from Products.Formulator.Errors import ValidationError, FormValidationError
> >try:
> > result = context.email_us_formulator.validate_all(context.REQUEST)
> >except FormValidationError, e:
> > # render error message; e.g. see mailing thread at:
> > #
> > http://sourceforge.net/mailarchive/forum.php?thread_id=1272274&forum_id=1702
>
> Hmmm. Went there. Was referred to a file called *Errors.py* in Formulator.
> File doesn't exist. Noticed the thread was recent and the author was the
> author of the program. What did I miss?!
guess You missed to look in the "Products/Formulator" directory on the
file system level, where You have installed the product. If "Errors.py"
would not be there, the script would not be able to do things like
"from Products.Formulator.Errors import ..."
[snip sending mail part]
> ># feedback message: needs a ZPT with id "mail_send"
> ># read name of submitter from "options/name" in this ZPT
> >return context.mail_send(name=result['YourName'])
>
> Okay, now I'm confused. What is this for?
Render a page template which displays a message to the submitter that
the email has been send. Though it may sound strange, some people like
to get feedback if they press a submit button on the web ;-)