[Zope] HTML Form processing

Colin Fox cfox@crystalcherry.com
04 Apr 2002 18:34:01 -0800


--=-DQMcSAfvrLXGSeBF4GlT
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi all.

I'm doing a bunch of HTML form processing, and part of that is allowing
the user to select a number of elements from a multi-select list.

If the user selects 2 or more items, I get a python list back, which is
great. I can use a <dtml-in ...> to process it.

The problem is, if only one item is selected, I *don't* get a list, and
my <dtml-in ...> barfs, complaining that I can't pass it a string.

Is there any way I can FORCE the value to be a list, even if there's
only one element? Or maybe make dtml just "shut up and do it", or do I
have to have some kind of hacky dtml? Or do I have to abandon dtml for
this and go for a script?

Thanks,
   Colin

--=20
Colin Fox                                       cfox@crystalcherry.com
CF Consulting Inc.                                    GPG Fingerprint:
                    D8F0 84E7 E7CC 5C6C 9982  F1A7 A3EB 6EA3 BC97 572F

--=-DQMcSAfvrLXGSeBF4GlT
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA8rQ0Zo+tuo7yXVy8RAjZnAJ4nl46HqESBZ21+2dNb9j+RAirkZgCeNhMb
woXEmQxoGf3W8djHR6IBb1M=
=KjOn
-----END PGP SIGNATURE-----

--=-DQMcSAfvrLXGSeBF4GlT--