On Sunday 27 May 2007 09:14, [EMAIL PROTECTED] wrote: > Hi all.. I'd like to use a BooleanRadioWidget in my formlib; I can say: > > > IMyForm['foo'].custom_widget = BooleanRadioWidget > > but don't see how I can override the default true/false constructor > args (currently they are ('on','off') and I'd like them to be > ('yes','no'). Short of subclassing my RadioWidget, is there a way?
The best would be to write a function like this: def MyBooleanWidget(field, request): return BooleanRadioWidget(field, request, true='yes', false='no') IMyForm['foo'].custom_widget = MyBooleanWidget Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list Zope3firstname.lastname@example.org http://mail.zope.org/mailman/listinfo/zope3-users