[Zope] How to use conditional statements

McDonnell, Larry lmcdonnell@protonenergy.com
Mon, 13 May 2002 12:02:00 -0400


Hi,

As part of my process, I need to have authorized users approval document in
the system I am building. I have setup a username/password call and ZSQL.
But my problem is error checking. This is how I input the information

<form name="form1" method="post" action="password_lookup">
<table width="75%" border="1">
   <tr> 
      <td width="27%">Last Name:</td>
      <td width="30%"> 
        <input name="lastname" size="30" value="">
      <td width="27%">Password:</td>
      <td width="30%"> 
        <input name="password" size="20" value="">
      <td width=27%"><input type="submit" name="Submit" value="Submit">
      </td>
    </tr>
</table>
</form>

On password_lookup I call <dtml-in check_password>. If this information is
wrong the process continues and I want this to stop. How do I check if there
is an error?

Also, using <dtml-if> statements , how do I check if the field is empty? The
reason is I need to let the user use the next empty approval block. Thanks.

Larry McDonnell

Proton Energy Systems
50 Inwood Rd.
Rocky Hill, CT 06067
(860) 571-6533 ext. 531
Email:lmcdonnell@protonenergy.com
www.protonenergy.com