[Zope] <!--#in string or list--> problem
Philip Aylesworth
zopelist@regalint.com
Fri, 14 May 1999 11:49:31 -0400
I am having a problem with a form that has check boxes on it. If several
checkboxes are checked it works great. If only one is checked then it
gives the following error:
Traceback (innermost last):
File lib/python/OFS/DTMLMethod.py, line 151, in __call__
(Object: editmanystatus.dtml)
File lib/python/DocumentTemplate/DT_String.py, line 513, in __call__
(Object: editmanystatus.dtml)
File lib/python/DocumentTemplate/DT_In.py, line 628, in renderwob
(Object: nums)
InError: Strings are not allowed as input to the in tag.
I can see that it is because instead of a list it now has a single
string but I don't know how to handle this. Is there a way to force an
object to be a list whether it is a list or a single string? Or, do I
have to test for this as a special case?
Right now I have:
<!--#in nums-->
<!--#call "REQUEST.set('num',_['sequence-item'])"-->
<!--#call editstatus-->
<!--#/in-->
where nums is a check box input from my form.
Phil A