form conversion error messages
(was: [Zope] virtual hosting and error messages)
Dieter Maurer
dieter@handshake.de
Mon, 27 Aug 2001 20:45:46 +0200 (CEST)
ed colmar writes:
> ....
> When filling out a form, I have a value that is being passed to zope as
> "cost:int"
>
> The form works fine when filled out correctly, but returns an error if
> this field is left blank. Now, this is the behaviour that I want, but I'm
> trying to track down where the error page comes from. This is different
> than "standard_error", and the really peculiar thing about it is that it
> pulls in the "standard_html" header and footer from the root folder, which
> happens to be a completely different host.
The reason:
Form value conversions are almost the first thing, ZPublisher
tries for a new request. It happens well before
traversal. Therefore, only the root context is available.
When you need more control over the error messages,
tools such as "Formulator" or "dtml-contract (I think, a GPL
product), will help you.
Dieter