Hi everybody, I made a Zclass with a multiple selection property "connection" and I want to create checkboxes wich must be checked if the value of the checkbox is one of the value of "connection". Here is my code (with a little help from my friend Laurie ;-) : <dtml-in "article_connection"> <input type=checkbox name=connection value="<dtml-var sequence-item>" <dtml-call expr="REQUEST.set('mylistitem',_['sequence-item'])"> <dtml-in connection> <dtml-if expr="_['sequence-item'] == mylistitem"> checked </dtml-if>> </dtml-in> <dtml-var sequence-item><br> </dtml-in> It sounded good BUT : Error Type: InError Error Value: Strings are not allowed as input to the in tag. Can somebody help me ?? _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
I think that either article_connection, or connection are not lists at the moment - you probably have to use "_.getitem(<<<<either connection or article_connection>>>>>)" to evaluate the string into something that in can iterate over. hth, Laurie -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Benoit DOMINIAK Sent: Friday, July 13, 2001 5:07 AM To: zope@zope.org Subject: [Zope] Multiple selection and looping Hi everybody, I made a Zclass with a multiple selection property "connection" and I want to create checkboxes wich must be checked if the value of the checkbox is one of the value of "connection". Here is my code (with a little help from my friend Laurie ;-) : <dtml-in "article_connection"> <input type=checkbox name=connection value="<dtml-var sequence-item>" <dtml-call expr="REQUEST.set('mylistitem',_['sequence-item'])"> <dtml-in connection> <dtml-if expr="_['sequence-item'] == mylistitem"> checked </dtml-if>> </dtml-in> <dtml-var sequence-item><br> </dtml-in> It sounded good BUT : Error Type: InError Error Value: Strings are not allowed as input to the in tag. Can somebody help me ?? _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _______________________________________________ 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 )
participants (2)
-
Benoit DOMINIAK -
Laurie Nason