[Zope] string or list?

Tres Seaver tseaver@palladion.com
Tue, 11 Apr 2000 11:12:24 -0500


Curtis Maloney <curtis@umd.com.au> wrote:

> Greetings,
> 
>         I'm having a small problem (duh! :)
> 
>         In my page, a person might select a number of items from a list.  The
> list is generated from an SQL query, and has unique IDs for each row.  Fine.
> Simple, right?
> 
>         Sure... And each row has a radiobutton input called 'done'.  When the
> user hits submit, if they've pressed any of the radiobuttons i will get either
> a 'done' string (one selected) or a 'done' list (multiple selected).
> 
>         Problem is.. how do i tell which?  Is it possible with DTML, as i try
> to avoid using external methods for something so trivial.

Use ZPublisher's marshalling features to get the values auto-converted to a
list.  See:

  http://www.zope.org/Members/Zen/howto/FormVariableTypes

for more zen.

Tres.
-- 
=========================================================
Tres Seaver  tseaver@digicool.com   tseaver@palladion.com