[MGNLUI-2542] Dynamic forms & cross-field interaction Created: 05/Jan/14  Updated: 01/Feb/24

Status: Accepted
Project: Magnolia UI
Component/s: dialogs, forms, framework
Affects Version/s: 5.0, 6.2
Fix Version/s: None

Type: Epic Priority: Critical
Reporter: Jan Haderka Assignee: Mikaël Geljić
Resolution: Unresolved Votes: 15
Labels: estimate-with-uncertainty, support, to-design, ui-ux-impr, validation
Remaining Estimate: 0.25d
Time Spent: 1.5h
Original Estimate: 1.5h

Issue Links:
Problem/Incident
Relates
relates to CONTEDIT-135 Highlight field group in case of vali... Closed
relates to MGNLUI-5300 Ability to Hide/Show Dialog fields or... Closed
causality
dependency
duplicate
relation
supersession
supersedes MGNLUI-3240 UI Form: Add cross field validation f... Closed
supersedes MGNLUI-3241 Composite Field: Add cross field vali... Closed
supersedes MGNLUI-3617 Cross/Conditional Field Validation fo... Closed
Template:
Epic Name: UI framework: dynamic forms and cross-field interaction
Acceptance criteria:
Empty
Date of First Response:
Visible to:
Yonelky Gonzalez
Story Points: 21

 Description   

It is currently very difficult to come up with "more intelligent" behavior when one field needs to interact with other fields from the same dialog/form.

We need to support such dynamic forms in a much easier way. Collecting some common requirements:

  • populating select options based on the value of another field
  • validating a field depending on the value of another field (including within a composite field itself)
  • enabling/disabling fields conditionally
  • potentially custom handling of any field, via plain Vaadin code
  • properly highlighting validation on sub-fields

On a side note, we might as well consider the original title/request if we find a convincing approach for it. — i.e. providing fields with some convenience access to "basic" properties of the form item.

More details/acceptance criteria can be found here: https://jira.magnolia-cms.com/browse/DEV-920



 Comments   
Comment by Jan Haderka [ 05/Jan/14 ]

For more discussion see http://forum.magnolia-cms.com/forum/thread.html?threadId=a94d6db2-77d4-40df-a09f-cb0c06205f70

Comment by Eric Hechinger [ 11/Jul/14 ]

This was discussed some times ago, and due to time pressure we were not able to define a proper solution:
The idea was to be able to :

  • configure by definition event change listener on
    • form
    • individual field

The first step would be to discuss this in the architecture cell in order to have a proper concept.

Comment by Mikaël Geljić [ 20/Aug/14 ]

+1 Form is definitely the level where you want to have such dynamic cross-field behavior.
I see an issue in having super powerful fields, while form would remain a dull black box you can't touch.

Comment by OLD Chris Jennings (Malleus) (Inactive) [ 23/Sep/16 ]

Please consider MGNLUI-4025. This issue with validating two or more fields for uniqueness comes from an Enterprise client use case.

Comment by Jan Haderka [ 26/Sep/16 ]

Hi Chris,

we are aware of the problem and running number of evaluations to see how to resolve this properly without breaking anything else. It is unfortunately non trivial thing to change.

If you need to go ahead already and implement such cross validation, you will need to write custom presenter. You can find sample of such code e.g. in external forms module.

Comment by OLD Chris Jennings (Malleus) (Inactive) [ 27/Sep/16 ]

Thanks, Jan. That's my intention when I get some spare time - I'll make sure the GitHub project is updated when I do. I just wanted to include this as an example of what clients are trying to do.

Comment by Antti Hietala [ 05/Apr/18 ]

New Vaadin 8 based UI framework should bring cross-field validation capability.

Comment by Antti Hietala [ 20/May/19 ]

Use case from SUGGEST-162:

Category node with subcategories as child nodes in jcr. [...] it is very common to have another dropdown with only the subcategory items that are relevant to the category dropdown selection.

Comment by Christopher Zimmermann [ 06/Jan/20 ]

A proposal for how the developer experience could work: https://wiki.magnolia-cms.com/display/WIKI/Cross-field+interactions

Comment by David Caviedes Marquez [ 09/Dec/20 ]

Hi all!

Can we have an aproximate schedule for this functionality? We are missing it for a long time ago and Vaadin 8 facilitates it! Please we need it!

Cheers

Generated at Mon Feb 12 08:57:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.