[Zope] Converting REQUEST style lists into real lists

Paula Mangas pamm@students.si.fct.unl.pt
Tue, 24 Jul 2001 03:35:03 +0100 (WEST)



Hi!


you can try to add *:list* to name value. That is:

name="varia" => name="varia:list"


And, when you receive data from form, *varia* will be a list...
You have an easy why to know which ones were choosen, because they have
differents values.

I hope that help,
Paula Mangas



On Tue, 24 Jul 2001, Tomek Giela wrote:

> When you put into your form:
>
> <input type="checkbox" name="varia" value="1">
> <input type="checkbox" name="varia" value="2">
> <input type="checkbox" name="varia" value="3">
> <input type="checkbox" name="varia" value="4">
> <input type="checkbox" name="varia" value="5">
> <input type="checkbox" name="varia" value="6">
>
> and then select first three of them and submit that form,
> you'll get in form "action" document:
>
> <dtml-var varia>
>
> displayed as: ['1','2','3']
>
> Is there an easy way to convert 'varia' into a list?
>
> Those inputs are dynamicaly generated from database, and I want to analyse
> which were choosen in <dtml-in "varia"> block.
>
> Or, maybe there is another trick to colect&analyse them in a simple loop?
>
> --
> Tomek Giela
> IMAGINATION DESIGN S.C.
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>

-- 

============================================================
 Quando tiver duvidas, nao questione aqueles que so' tem
 certezas, pois corre o risco de ficar com mais duvidas!...
------------------------------------------------------------
Paula Monteiro Mangas

e-mail: Paula.Mangas@mail.com
URL:	http://students.fct.unl.pt/~pamm/
TMV:    (+351) 96 2559034
============================================================