Documentation · ViewHelper reference

Field / MultiRelationViewHelper

Multi-table-relation FlexForm field ViewHelper /

  • Tag usage example

    <flux:field.multiRelation name="NULL" label="NULL" default="NULL" required="1" exclude="1" transform="NULL" enabled="1" requestUpdate="1" displayCond="NULL" inherit="1" inheritEmpty="1" clear="1" variables="{foo: 'bar'}" extensionName="NULL" validate="'trim'" size="123" multiple="1" minItems="123" maxItems="123" itemListStyle="NULL" selectedListStyle="NULL" renderMode="NULL" items="[mixed]" emptyOption="[mixed]" translateCsvItems="1" table="NULL" condition="NULL" mm="NULL" foreignField="''" foreignLabel="''" foreignSelector="NULL" foreignSortby="''" foreignDefaultSortby="''" foreignTableField="''" foreignUnique="NULL" symmetricField="''" symmetricLabel="''" symmetricSortby="''" localizationMode="''" localizeChildrenAtParentLocalization="1" disableMovingChildrenWithParent="1" showThumbs="1" matchFields="{foo: 'bar'}" oppositeField="''">
    	<!-- tag content - may be ignored! -->
    </flux:field.multiRelation>
  • Inline usage example

    {flux:field.multiRelation(name: 'NULL', label: 'NULL', default: 'NULL', required: 1, exclude: 1, transform: 'NULL', enabled: 1, requestUpdate: 1, displayCond: 'NULL', inherit: 1, inheritEmpty: 1, clear: 1, variables: {foo: 'bar'}, extensionName: 'NULL', validate: ''trim'', size: 123, multiple: 1, minItems: 123, maxItems: 123, itemListStyle: 'NULL', selectedListStyle: 'NULL', renderMode: 'NULL', items: [mixed], emptyOption: [mixed], translateCsvItems: 1, table: 'NULL', condition: 'NULL', mm: 'NULL', foreignField: '''', foreignLabel: '''', foreignSelector: 'NULL', foreignSortby: '''', foreignDefaultSortby: '''', foreignTableField: '''', foreignUnique: 'NULL', symmetricField: '''', symmetricLabel: '''', symmetricSortby: '''', localizationMode: '''', localizeChildrenAtParentLocalization: 1, disableMovingChildrenWithParent: 1, showThumbs: 1, matchFields: {foo: 'bar'}, oppositeField: '''')}

Arguments

Argument Description Type
clear

If TRUE, a "clear value" checkbox is displayed next to the field which when checked, completely destroys the current field value all the way down to the stored XML value

boolean
condition

Condition to use when selecting from "foreignTable", supports FlexForm "foregintablewhere" markers

string
default

Default value for this attribute

string
disableMovingChildrenWithParent

Disables that child records get moved along with their parent records.

boolean
displayCond

Optional "Display Condition" (TCA style) for this particular field. See: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html#displaycond

string
emptyOption

If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property's value (cast to string) as label.

mixed
enabled

If FALSE, disables the field in the FlexForm

boolean
exclude

If TRUE, this field becomes an "exclude field" (see TYPO3 documentation about this)

boolean
extensionName

If provided, enables overriding the extension context for this and all child nodes. The extension name is otherwise automatically detected from rendering context.

string
foreignDefaultSortby

If a fieldname for foreign_sortby is defined, then this is ignored. Otherwise this is used as the "ORDER BY" statement to sort the records in the table when listed.

string
foreignField

The foreign_field is the field of the child record pointing to the parent record. This defines where to store the uid of the parent record.

string
foreignLabel

If set, it overrides the label set in TCA[foreign_table]['ctrl']['label'] for the inline-view.

string
foreignSelector

A selector is used to show all possible child records that could be used to create a relation with the parent record. It will be rendered as a multi-select-box. On clicking on an item inside the selector a new relation is created. The foreignselector points to a field of the foreigntable that is responsible for providing a selector-box this field on the foreigntable usually has the type "select" and also has a "foreigntable" defined.

string
foreignSortby

Field on the child record (or on the intermediate table) that stores the manual sorting information.

string
foreignTableField

The field of the child record pointing to the parent record. This defines where to store the table name of the parent record. On setting this configuration key together with foreign_field, the child record knows what its parent record is - so the child record could also be used on other parent tables.

string
foreignUnique

Field which must be uniue for all children of a parent record.

string
inherit

If TRUE, the value for this particular field is inherited - if inheritance is enabled by the ConfigurationProvider

boolean
inheritEmpty

If TRUE, allows empty values (specifically excluding the number zero!) to be inherited - if inheritance is enabled by the ConfigurationProvider

boolean
itemListStyle

Overrides the default list style when maxItems > 1

string
items

Items for the selector; array / CSV / Traversable / Query supported

mixed
label

Label for the attribute, can be LLL: value. Optional - if not specified, Flux tries to detect an LLL label named "flux.fluxFormId.fields.foobar" based on field name, in scope of extension rendering the Flux form. If field is in an object, use "flux.fluxFormId.objects.objectname.foobar" where "foobar" is the name of the field.

string
localizationMode

Set whether children can be localizable ('select') or just inherit from default language ('keep').

string
localizeChildrenAtParentLocalization

Defines whether children should be localized when the localization of the parent gets created.

boolean
matchFields

When using manyToMany you can provide an additional array of field=>value pairs that must match in the relation table

array
maxItems

Maxium allowed number of items to be selected

integer
minItems

Minimum required number of items to be selected

integer
mm

Optional name of MM table to use for record selection

string
multiple

If TRUE, allows multiple selections

boolean
name

Name of the attribute, FlexForm XML-valid tag name string

string
oppositeField

Name of the opposite field related to a proper mm relation

string
renderMode

Alternative rendering mode - default is an HTML select field but you can also use fx "checkbox" - see TCA "select" field "renderType" attribute

string
requestUpdate

If TRUE, the form is force-saved and reloaded when field value changes

boolean
required

If TRUE, this attribute must be filled when editing the FCE

boolean
selectedListStyle

Overrides the default selected list style when maxItems > 1 and renderMode is default

string
showThumbs

If TRUE, adds thumbnail display when editing in BE

boolean
size

Size of the selector box

integer
symmetricField

In case of bidirectional symmetric relations, this defines in which field on the foreign table the uid of the "other" parent is stored.

string
symmetricLabel

If set, this overrides the default label of the selected symmetric_field.

string
symmetricSortby

Works like foreignsortby, but defines the field on foreigntable where the "other" sort order is stored.

string
table

Define foreign table name to turn selector into a record selector for that table

string
transform

Set this to transform your value to this type - integer, array (for csv values), float, DateTime, Vendor\MyExt\Domain\Model\Object or ObjectStorage with type hint.

string
translateCsvItems

If TRUE, attempts to resolve a LLL label for each value provided as CSV in "items" attribute using convention for lookup "$field.option.123" if given "123" as CSV item value. Field name is determined by normal Flux field name conventions

boolean
validate

FlexForm-type validation configuration for this input

string
variables

Freestyle variables which become assigned to the resulting Component - can then be read from that Component outside this Fluid template and in other templates using the Form object from this template

array
Required attribute

Revision history