In this case, if any of the fields are left empty and the form is submitted to
the FormProcessor object, the corresponding DTML variable will never come into existence. Consequently, the FormProcessor object (which, you will remember, references each of these variables) will raise a KeyError when it attempts to access this non-existent variable.
Here's what it looks like:
Don't like this? You can fix it by telling Zope what to do if it encounters a missing variable by adding the "missing" attribute to the variable call in the form processor. Take a look at the new, improved FormProcessor:
Welcome to Earth, <b><dtml-var species
missing="Alien"></b> from the
planet <b><dtml-var planet missing="Zorgo"></b>.
How was your journey? Travelling <b><dtml-var distance missing="so
light years must be quite a shock to the system. Why don't
you relax and have
The "missing" attribute sets a default value for the variable in the event that
Zope cannot find it, in an attempt to avoid those ugly error messages.