-----Original Message----- From: Jim Washington [mailto:jwashin@vt.edu] Sent: Thursday, April 01, 1999 11:39 AM To: zope@zope.org Subject: [Zope] getting object types?
I'm sure this must be easy, but I have been searching the lists and documentation for a couple of hours and could not find how to do it.
What I want to do is get info from an HTML multiple-select list box that looks like:
<select multiple Name="persons"> <!--#in mylist--> <option value="<!--#var index-->" > <!--#var firstname--> <!--#var lastname--></option> <!--#/in--> </select>
Unfortunately, if there is only a single item selected, RESPONSE.person is a string, and if multiple items are selected, it is a list.
Any suggestions?
Try: <select Name="persons:list"> That will make ZPublisher marshal it into a list, even if it has only one item. I left the 'multiple' out 'cuz I've never heard of it. :) -Michel
--Jim Washington
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Thanks, Michel. Works like a charm. My project is a trouble-ticket database. I use 'multiple' here because I have a one-to-many relationship between trouble-tickets and technicians. If two or more of our techs decide to work together on a ticket, they can assign themselves to it at one time by ctrl-clicking the list. regards, --Jim Washington
Try:
<select Name="persons:list">
That will make ZPublisher marshal it into a list, even if it has only one item. I left the 'multiple' out 'cuz I've never heard of it. :)
-Michel
participants (2)
-
Jim Washington -
Michel Pelletier