Can I group the fields of the Plone portlet into fields?

I have a very long portlet editing screen, so I would like to group its fields using fields (and then, possibly, layout them on the tabs of the built-in form, for example, those used in the content editing view).

Is this possible with zope.formlib?

+6
source share
1 answer

In conclusion, the answer of Plone 4 really consists in using portlets based on z3c.form and creating fields, inheriting the form scheme from plone.supermodel.model.Schema and defining fields using plone.autoform.directives.fieldset: https: // pypi. python.org/pypi/plone.autoform#organizing-fields-into-fieldsets

Support for them was introduced in plone.app.portlets 2.3 (while the latest version of Plone 4 during recording is 2.5.1).

It is enough to use the following base classes for portlets based on z3c.form, instead of formbib:

from plone.app.portlets.browser.z3cformhelper import AddForm from plone.app.portlets.browser.z3cformhelper import EditForm 

It's also good to know that z3c.form-based portlets will be default in Plone 5 (and base classes in z3cformhelper will be default base classes).

+3
source

Source: https://habr.com/ru/post/952673/


All Articles