Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3715

Only values for selected options should be saved when using SwitchableFieldDefinition

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 5.4.6
    • 5.4.3
    • forms
    • Yes
    • Yes
    • Saigon 35
    • 8

    Description

      When we change this, care should be taken that values in all options remain available while the user mainly switches between them. The values for all other options but the selected one should only be cleared once you save the form. Not all systems behave this way, but most do - it's commonly seen as good and expected behavior.

      So, I fill in a value for option 1, switch to option 2, fill in another value there, then switch back to option 1. My initial value I've set in option 1 should still be there. Once I save the form, only the value for option 1 is stored. The value for option 2 is discarded.

      Update: This ticket just support for basic Switchable field using SwitchableTransformer, not providing any delegating transformer for the switchable field for now.
      I did provide approach to handle more complex sub-fields than SwitchableTransformer, just find the attached ComplexFieldFriendlySwitchableTransformer or get it from here. It help to alters JCR adapters directly

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                oanh.thai Oanh Thai Hoang
                rgange Richard Gange
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - 5d Original Estimate - 5d
                      5d
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 7d 2.75h
                      7d 2.75h