[Zope] Five EditFrom and Fields appears broken
binbrain at gmail.com
Fri Jan 8 11:08:15 EST 2010
Does anyone successfully use zope.formlib.form Fields with
Products.Five.formlib.formbase EditForm? I was trying to figure out why my
form_fields.omit and custom_widget were being ignored. I followed it up the
stack and found the method setUpEditWidgets in zope.app.form.utility never
takes Fields into account and just looks at the schema and context to
determine the fields. So I was starting to think maybe you don't use Fields
with Five forms, but there is a unit test in Products.Five.formlib.tests
view.py that actually thinks its using Fields. I don't think this is
actually the case though, the test just doesn't touch omit or custom_widget
functionality so it passes thinking Fields is working.
The /Products/Five/form/__init__.py imports zope.app.form.utility
setUpEditWidgets. zope.formlib has a different setUpEditWidgets method in
zope/formlib/form.py that actually takes form_fields as the 1st param.
So in summary, if you think your using Fields in Five try using omit or
custom_widget and see if it works and you actually are really using Fields.
If it works maybe I have something messed up on my end.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Zope