[Zope] Populating a :list variable from the results of a ZSQL method
Tony McDonald
tony.mcdonald@ncl.ac.uk
Fri, 10 Nov 2000 10:10:33 +0000
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 the data back from the database, 'options' comes back as a
string, and <dtml-in options> ... </dtml-in> gives errors (basically,
it can't iterate over a string).
I tried
<dtml-call "REQUEST.set('new_options:list', options)">
and then tried iterating over new_options, but the variable didn't exist...
Has anyone got any solutions for this?
TIA
Tone
------
Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 222 5116
A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope