[Grok-dev] schema.List widget with non-unique values from a Choice

Jeroen Michiel jmichiel at yahoo.com
Sat May 2 15:13:45 EDT 2009


I'm trying to use a schema.List that gets it's values from a source (by
using a Choice as value_type), but I want to allow multiple entries of the
same value in the List. I added unique=False in the List definition, but
that still renders the default widget that removes an entry from the
possible entries once it's used.

this is my field definition (by heart, not copy-pasted):
persons = schema.List(title=u'People taking Part', unique=False,
value_type=schema.Choice((u'Male', u'Female'))) 

How should I solve this one? Do I need to use something else than a Choice,
or do I need to override the widget (and perhaps brew my own)?

Any help appreciated!
View this message in context: http://www.nabble.com/schema.List-widget-with-non-unique-values-from-a-Choice-tp23349366p23349366.html
Sent from the Grok mailing list archive at Nabble.com.

More information about the Grok-dev mailing list