[Zope-DB] Is there a basic way to show a drop down menu from a list queried

Charlie Clark charlie@begeistert.org
Fri, 11 Jul 2003 19:35:07 +0200


On 2003-07-11 at 17:30:27 [+0200], Robert Crotty wrote:
> Hello,
>  
> Is there a way to show a drop down list for choosing a product that is 
> based upon a query or table in a database.  The list is a list of parts 
> that are in an MS Access database.  This list changes and I want it to 
> show in a form for selection and posting into a record in MS Access from 
> the dtml method and html form..

In ZPT.

Assume you have a ZSQL method like qProducts
SELECT * from products.

<form>
<select name=product>
<option tal:repeat="result here/qProducts" tal:attributes="value 
result/name" tal:content="result/name">
</select>
</form>

Charlie