[Zope] Form OPTION and Display of SELECTED Value

Andy McKay andy@agmweb.ca
Mon, 24 Jun 2002 14:15:59 -0700


sequence-item is python for sequence minus item, use
_['sequence-item']==category instead
--
  Andy McKay

----- Original Message -----
From: "Alexander M Hottenstein" <ahottens@engin.umich.edu>
To: <zope@zope.org>
Sent: Monday, June 24, 2002 2:14 PM
Subject: [Zope] Form OPTION and Display of SELECTED Value


I have the following code to display options, one of which has already
been selected:

  <input type="hidden" name="categories" size="35" value="Feature Bytes
Faculty Students Research Alumni Giving">

<SELECT name="category">
 <dtml-in categories>
      <dtml-if "sequence-item==category">
          <OPTION value="<dtml-var sequence-item>" selected><dtml-var
sequence-item></OPTION>
      <dtml-else>
          <OPTION value="<dtml-var sequence-item>"><dtml-var
sequence-item></OPTION>
      </dtml-if>
 </dtml-in>
</SELECT>

This should display a list of the categories, with the correct one
selected. This does not work however thanks to a NameError. Does anyone
have any ideas as to what may be the correct code?

- Alex