I'm stuck using two schemas to build a z3c.GroupForm that has inline validation:
Following https://pypi.python.org/pypi/z3c.form#group-forms I did:
from plone.directives.dexterity import AddForm
from z3c.form import field
from z3c.form import group, form
class CustomerGroup( group.Group ):
label = u'Customer'
fields = field.Fields(ICustomer, prefix='customer')
class CustomerRegistrationAddForm(group.GroupForm, AddForm):
ignoreContext = True
fields = field.Fields(IEmailUser).omit('customer')
groups = (CustomerGroup,)
This works. But it gives me really plain rendering and no inline validation. I tried to include mixings from plone.autoform but these seem not to be compatible -> MRO errors.
I am quite sure that I missed something. There are plone.app.z3cform and other wrappers for z3c.form usage in Plone. But I do not find an example of using them for z3c.groups, so I tried the basic z3c variant.
The usecase I like to achieve is the following: A form that has the fields of Schema A and Schema B each in a tab, respectively. The form action handling then is manually coded and will take care of the handling of underlying content types. With other words: no dexterity "positive connotation" magic will/should be used.
But I like to have inline validation according to the schema hints and adapters I registered for the schemas.
Problem solved. The groups of Z3c are called fieldsets in Plone, now. The following does the trick.