On 11/25/11 7:04 AM, Imran Azad wrote:
Hi,
I am using Dexterity and have lots of select lists on my page and would like
to know how to override the "no value" option for a specific select list.
You can do this with a z3c.form value adapter:
from z3c.form import widget
from five import grok
noValueMessage = widget.StaticWidgetAttribute(u'custom message',
field=IMyInterface['my_field_name'])
grok.global_adapter(noValueMessage, name=u"noValueMessage")
If there's a common pattern for deriving the text from the title of the
field, it may make more sense to create a custom version of the widget
and override its noValueMessage attribute.
----------
David Glick
Web Developer
[email protected]
206.286.1235x32
Groundwire Consulting is here.
http://groundwire.org/about/FAQ-gw-consulting
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers