Collective Easyform - Subforms?

Is there an option to create subforms with collective easyform or should I use z3c.form for this?

I noticed a reference to subforms in the sasyform saveddata traversal adapter, but am not sure how it is relevant...

Is this still the recommended way when working with z3c.form?
https://docs.plone.org/develop/plone/forms/z3c.form.html#subforms

What are subforms? Usecase?

Usecase is: employee types tracking id from the label of a return package, the order with all line items is returned in subform, user then selects the returned item from the order and a RETINS document is spit out to the seller...

The order data and tracking id are in a relational database and will be provided to the widget by way of a dynamic vocabulary.

What you can do is break up the workflow in multiple forms and let the first form to query/lookup the tracking id post its results to the second form which retrieves the order. But from your description of the functionality a custom z3c.form in python it's at best prototyping to try to achieve this in easyform instead of writing a custom view with a z3c.form defined in Python.

(b.t.w. Plone/Zope still uses z3c.form 3.x as in z3c.form 4.x there were some breaking changes/deprecations. there is some more information on the z3c.form pypi page. z3c.form · PyPI - One of the removed features are ObjectSubForms

1 Like

Thank you @fredvd I looked at that by making the first easyform the default document in a folder and then an attempt to use traverse and pass the value to a second form.

This resulted in strange layout artifacts, where the portlets would show under the form. And, the second form resulted in becoming submitted without user interaction... Another approach I then considered was to use custom scripting as an action handler, but I quiclky rejected that from a maintenance perspective.

So if it takes a lot of situps and custom code, I might as well write it on the filesystem. I am now experimenting with the DGFTreeSelect fieldwidget, which is already in use in other parts of the site.

Plone Foundation Code of Conduct