[Zope] Formulator acts funny for 2-character options
Jean Jordaan
jean at upfrontsystems.co.za
Mon Aug 18 19:03:17 EDT 2003
Hi Martijn & all
This code,
context.REQUEST.SESSION.set('state_evaluate_items', ['yes', 'no'])
in a state helper for this field::
evaluate = fields.RadioField('evaluate',
title='Please contact me for a full evaluation')
evaluate.tales['default'] = "form/REQUEST/SESSION/state_evaluate"
evaluate.tales['items'] = "form/REQUEST/SESSION/state_evaluate_items"
causes this HTML to be rendered::
<input value="yes" name="field_evaluate" type="radio" />yes<br
/><input value="o" name="field_evaluate" type="radio" />n
This is also the case for MultiCheckBoxFields and other fields
with items.
I'm assuming it has to do with this behaviour::
A list item can also be a tuple consisting "
"of two elements. The first element of the tuple should be a string "
"that is name of the item that should be displayed. The second "
"element of the tuple should be the value that will be submitted.
and that a 2-char string is misrecognized as a 2-item tuple, but
I can't figure out where in the code it occurs. Where should I
start looking?
I'm using Formulator-1.4.1, but I did a diff with CVS HEAD and didn't
notice anything that looked like it addresses this issue.
--
Jean Jordaan
http://www.upfrontsystems.co.za
More information about the Zope
mailing list