[Zope] stripping [] from a var
Alexandre Ratti
alex@gabuzomeu.net
Thu, 02 Dec 1999 11:55:15 +0100
Hi Anders,
This looks like a Python list var. When several form fields have the same
name their content is returned in a Python list. I suppose you're seeing
the list content is raw form.
In a DTML method you can loop on the list with:
<dtml-in yourList>
You value is: <dtml-var sequence-item>
</dtml-in>
I suppose you can do something similar in a Z SQL method.
HTH.
Alexandre
At 12:00 01/12/1999 -0800, you wrote:
>Date: Wed, 01 Dec 1999 19:05:27 +0100
>From: Anders Gaarsdal Holst <anders@colorweb.dk>
>To: zope@zope.org
>Subject: [Zope] stripping [] from a var
>
>Hello!
>
>I have a form with a number of checkboxes (with the same name
>attribute). When the form is submitted I get a var in the form of:
>
>var = [checkboxvalue1, checkboxvalue2, checkboxvalue3....]
>
>I want to make a <dtml-in> loop (in a ZSQL method) using these as values.
>As far as I have understood, I then have to strip the [ ] from the var.
>How do I do this?
>
>
>Regards,
> A n d e r s G a a r s d a l H o l s t