Hi all, Say I've got a form with this in it select type="checkbox" name="options:list" option value="1"number 1 option value="2"number 2 option value="3"number 3 /select When this is put into an SQL database, the field 'options' is this (string) ['1', '2', '3'] or ['2', '3'] etc. When I get
Tony McDonald wrote: When this is put into an SQL database, the field 'options' is this (string) ['1', '2', '3'] or ['2', '3'] etc. So you're storing the sequence as a string of the type shown above... ...ow ;-) Might be best to change your SQL Schema so your store one row per option...
don't know about inside zope, but in plain python you could just do: new_options = list(options) perhaps an external method would cut it: return list(inputstring) -- Geir Bækholt web-developer/designer [EMAIL PROTECTED] http://www.funcom.com on Friday, November 10, 2000 Tony McDonald
tone, How about (untested): where 'dboptions' is the string pulled from the DB, and 'options' is the list needed. dtml-call "REQUEST.set('options',)" dtml-in "_.string.split(dboptions[1:-1],',')" dtml-call "options.append(_.int(_['sequence-item']))" /dtml-in This would then give you take