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

Sebastian Ware sebastian at urbantalk.se
Tue May 12 15:55:12 EDT 2009


Try something like:

contact_type = schema.List(title=u"Typy",  
value_type=schema.Choice(vocabulary = 'Contact Types'), unique=False)

Mvh Sebastian



12 maj 2009 kl. 20.51 skrev Jeroen Michiel:

>
> Thanks for the info!
>
> I tried doing that, but I'm not sure where to hook up that  
> vocabulary or
> source?
>
> My definition now looks like this:
> persons = schema.List(title=u'People taking Part', unique=False,
> value_type=schema.TextLine())
>
> using 'vocabulary=...' in both List and TextLine is not allowed, so  
> should I
> supply it in the form-code to the widget?
>
>
> Souheil CHELFOUH wrote:
>>
>> your value type is a TextLine in this case and you simply need a
>> vocabulary or a source
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/schema.List-widget-with-non-unique-values-from-a-Choice-tp23349366p23508265.html
> Sent from the Grok mailing list archive at Nabble.com.
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list