[Zope] sequence items and multiple selection boxes

David Siedband david@calteg.org
Tue, 24 Jun 2003 10:02:33 -0700


I've got a DTML form page where people can update the locations that 
are covered by an environmental project.  I have a multiple selection 
HTML form element that I am populating with the results of an SQL query 
that retuerns the complete list of locations.  I have another query 
that returns a list of locations that are already associated with a 
specific project.  What I'd like to do is iterate through all the 
places and add the SELECTED property to those that are already entered 
for a specific project.  What I have in mind is something like.

<dtml-in "queries.getPlacesAll()">
   <dtml-in "queries.getPlacesForHypothesis()" prefix=obj>
     <option value="<dtml-var PLID>" <dtml-if "PlaceID in (??????)"> 
selected </dtml-if>><dtml-var PlaceName></option>
   </dtml-in>
</dtml-in>

Suggestions?

thanks,

David