[Zope] problem with selection list in ZClass's addForm
Darran Edmundson
Darran.Edmundson@anu.edu.au
Mon, 7 Feb 2000 01:45:57 +1100
Property Degree in my ZClass is of type "selection", getting
its choices from the root folder property DegreeTypes. DegreeTypes
is of type "lines" and has choices ['B.Sc.','M.Sc.','Ph.D.'].
My problem is that the user's choice is not getting set
properly by the class's constructor. The following is
the relevent snippet from my addForm:
<SELECT NAME="Degree"><dtml-in DegreeTypes>
<OPTION VALUE="<dtml-var sequence-index>"><dtml-var
sequence-item></OPTION>
</dtml-in></SELECT>
I've looked at the REQUEST variable being passed from
the form and it is an integer corresponding correctly
to the index of the selected Degree. I have tried casting
this to string and to int but to no avail - it always defaults
to the first element of DegreeTypes. (I can subsequently set
it to any of the 3 choices in the intance's Properties sheet.)
What am I missing?
Darran.