Hi, Joel


Just displaying the list in a <select>:

<select name="whatever">
<dtml-in ZSQLMethodthatgetsthelist>
<option value="<dtml-var theFieldname>"><dtml-var theFieldname></option>

If "whatever" already has a value and you want that selected:

<select name="whatever">
<dtml-in ZSQLMethodthatgetsthelist>
<option value="<dtml-var theFieldname>"
<dtml-if "whatever == theFieldname"> selected </dtml-if>>
<dtml-var theFieldname></option>


the </option> tags are apparently optional.


-- Jim Washington

joel grimes wrote:
> I'm trying to fill a combo-box (pardon the vb-centric lingo - I don't know
> what the things are called - it's a <select...><option...> thing) with items
> selected from a table.  I haven't a clue how to do this.  I've got the ODBC
> Connection and SQL Method working, but how do I iterate through the query
> results to fill a drop-down?
> Thanks
> Joel Grimes

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to