[Zope] ZSQL Method and Checkboxes with unique names

Ulrich Wisser liste at publisher.de
Thu Jan 8 15:03:23 EST 2004


Hello Kariina,

> I have a ZSQL Method called 'ALL' wich returns
> addresses, and I also have a DTML Method. In this DTML
> Method I want to display every 'ALL' element (address) as
> a checkbox with unique name(like a1, a2, a3, a4...).
> How can I do this?

<dtml-in ALL prefix=seq>
    <input type="checkbox" name="box&dtml-seq_index;">&dtml-address;
</dtml-in>

But I believe you do not want to do this. Please read about
":list" or ":records" in the Zope book.

<dtml-in ALL prefix=seq>
    <input type="checkbox" name="box:list">&dtml-address;
</dtml-in>

would give you all selected address in a list and you can
iterate them with dtml-in.

Ulrich

-- 

World Wide Web Publisher, Ulrich Wisser, Vallatorpsv.158, S-18752 Täby
http://www.publisher.de    Tel: +46-8-53460905   Fax: +46-8-534 609 06





More information about the Zope mailing list