jesse writes:
 > I'm improving on Smarter forms so that instead of having to hard code every field 
 >into the code that checks for errors, it automaticly reads the dictionary that is in 
 >REQUEST and checks every key in it.  I'm trying to work with this...
 > ....
 >         <dtml-in "REQUEST.keys()">   
 > <dtml-comment> starting the loop </dtml-comment>
 >         <dtml-if "_[sequence-key].value('')">
 > <dtml-comment> I'm saying that if the current key is empty, display this. 
I would use:

   <dtml-in "REQUEST.items()">
     <dtml-unless sequence-item> <!-- the value-->
       something wrong with <dtml-var sequence-key> <!-- the field name-->

However, as a user, I would not be too happy to get the internal field names.

Recently, I did something similar to you.
However, I used a list of dictionaries to describe the form.
Each list entry describes one form field as a dictionary
with keys "name", "title", "type", "condition", ...
The description is used both for creating the form and
for verifying that all requirements are met.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to