Does anyone have a suggestion for conditional fields and/or conditional field-options in easyform?
Example: You select option a for field_1 and the options in field_2 change from [x, y, z] to only [y, z]. The user needs to be able to configure the conditions and options.
I'm aware of the following options:
The masterselect widget (plone.formwidget.masterselect) allows configuring such fields in a python schema. It has no supermodel integration (xml-schema) and UI though which is required to work with easyform.
The depends-pattern in patternslib (Depends — Patterns) allows a nice and clean way to create such forms by hand in html. It has no UI, z3c.form and supermodel/easyform integration though.
Write custom JS to filter out options in field_2 depending on the current value of field_1. This approach is probably the quickest but not configurable by a editor and would need to be rewritten/adapted for every conditional field.
I would go for some custom JS code. Configurable mappings could be accomplished through a controlpanel that either the Site Manager or the Plone provider could make (easily)...quick & d̶i̶r̶t̶y̶ easy
Thanks for the suggestions! In the meantime the client has changed his mind and the requirement is no longer
If anyone else is planning to create something reuseable I'm happy to help since I would really like to have such a feature in easyform and dexterity