[zope2-tracker] [Bug 507003] [NEW] Five EditFrom w/Fields appears broken

Jim Pharis binbrain at gmail.com
Wed Jan 13 09:54:37 EST 2010


Public bug reported:

In Zope2.12.2...

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.

** Affects: zope2
     Importance: Undecided
         Status: New

-- 
Five EditFrom w/Fields appears broken
https://bugs.launchpad.net/bugs/507003
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list