{"id":162,"date":"2012-05-11T15:12:26","date_gmt":"2012-05-11T13:12:26","guid":{"rendered":"http:\/\/blog.gocept.com\/?p=162"},"modified":"2013-07-15T12:56:14","modified_gmt":"2013-07-15T10:56:14","slug":"custom-widgets-in-zope-formlib","status":"publish","type":"post","link":"https:\/\/blog.gocept.com\/2012\/05\/11\/custom-widgets-in-zope-formlib\/","title":{"rendered":"Custom widgets in zope.formlib"},"content":{"rendered":"

zope.formlib<\/a>\u00a0has the ability to customize the used widget like this:<\/p>\n

class KeywordsManagementForm(five.formlib.formbase.SubPageForm):\r\n    form_fields = zope.formlib.form.Fields(IKeywords)\r\n    form_fields['keywords'].custom_widget = KWSelectWidgetFactory<\/pre>\n

I do not like this approach for two reasons:<\/p>\n