[Zope] Generatiing Lists with DTML.
Fernando Lujan
flujan at gmail.com
Tue May 24 12:42:04 EDT 2005
Hi,
I have a array data type in my DB wich have the following format :
{1,2,3} ( ids_test ). Now in my web application, I have a multiple
select wich options must be marked as selected if the number is in the
array described above. How can I make the above format be converted to
a list of elements?
For instance:
<html>
<body>
<dtml-in searchIdsTest>
<dtml-call "REQUEST.set('ids_test', '['+ids_test[1:-1]+']')">
</dtml-in>
<form>
<select name="id_test" multiple="true">
<dtml-in serch_id_test>
<option value="&dtml-id_test;" <dtml-if id_test in
ids_test> selected="true"</dtml-if>></option>
</dtml-in>
</select>
</form>
</body>
</html>
Thanks.
Fernando Lujan
More information about the Zope
mailing list