Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MGNLCTS-86

...

Here is a composite field that consists of a text field and a date field.

Info

To export the content of the composite fields for translation via the CTS module, the composite field type has to be registered in the configuration of the module. For details see Registering additional field types.

Table of Contents

Composite field properties

...

<composite field name>

required

Name of parent composite field.

fields

required

Node containing child fields.

<child field names>

required

Name of the child fields. You can use any simple field definition.

class

required

Field definition class of the child field.

<child field properties>

required/optional

Any properties the child field supports.

class

required

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

layout

optional, default is horizontal

Defines the layout of the child fields: horizontal or vertical.

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.