Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Setting conditions for selecting the next step in a multistep form.
  • Assigning categories to a content item, where the composite field consists of a category dropdown and a button for reordering categories.
  • Defining an image gallery using a media select field, where the composite media field consist of a thumbnail and caption text. 
  • Specifying an access control list for JCR workspaces, where the composite ACL field consists of permission, scope and path.

Classclassinfo.magnolia.ui.form.field.definition.CompositeFieldDefinition

...

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
form:
  tabs:
    - name: tabEvent
      label: Event
      fields:
        - name: title
          class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
          label: Event
          fields:
            - name: title
              class: info.magnolia.ui.form.field.definition.TextFieldDefinition
              label: Title
            - name: date
              class: info.magnolia.ui.form.field.definition.DateFieldDefinition
              label: Date
Localtab
titleJCR node
Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
form

 


Mgnl n
tabs

 


Mgnl n
tabEvent

 


Mgnl n
fields

 


Mgnl n
event

 


Mgnl n
fields

 


Mgnl n
title

 

Mgnl p
class

info.magnolia.ui.form.field.definition.TextFieldDefinition

Mgnl p
label

Title

Mgnl n
date

 


Mgnl p
class

info.magnolia.ui.form.field.definition.DateFieldDefinition

Mgnl p
label

Date

Mgnl p
class

info.magnolia.ui.form.field.definition.CompositeFieldDefinition

Mgnl p
label

Event

...

Properties specific to the composite field.

class

required

Definition class of the composite parent field. Use info.magnolia.ui.form.field.definition.CompositeFieldDefinition.

transformerClass

optional, default is info.magnolia.ui.form.field.transformer.composite.CompositeTransformer

Custom property transformer definition.

Info
titleBest practice
Excerpt

When nesting composite fields, use the delegating transformer classes, DelegatingCompositeFieldTransformer or DelegatingMultiValueFieldTransformer, rather than the other available transformer classes.