Five EditFrom w/Fields appears broken

Bug #507003 reported by Jim Pharis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

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.

Changed in zope2:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.