[Zope-dev] Asking for the type of a variable
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Tue, 9 Nov 1999 17:13:59 -0500 (EST)
On Tue, 9 Nov 1999, David S. Harrison wrote:
>
> Actually, the reason this arises is forms. I have a series of radio
> buttons in a form. When submitted to Zope, I notice that if one item
> is selected, the value is a string. When many items are selected,
> the value is a list of strings. Since <dtml-in> does not accept a
> single string as an argument, I need to test to see if the incoming
> value is a string or a list of strings before processing it. I will
You can just append :list to your variable in the Form and it will
automatically get converted to a list. Then you can use <dtml-in ...> even
for one item.
Pavlos