The 5.7 branch of Magnolia reached End-of-Life on December 31, 2023, as specified in our End-of-life policy. This means the 5.7 branch is no longer maintained or supported. Please upgrade to the latest Magnolia release. By upgrading, you will get the latest release of Magnolia featuring significant improvements to the author and developer experience. For a successful upgrade, please consult our Magnolia 6.2 documentation. If you need help, please contact info@magnolia-cms.com.
The form definition defines the tabs and fields in a dialog.
Form properties
Simple form definition with two tabs and Title (plain text), Text (rich text) and a link field to link to an asset from DAM.
form: tabs: - name: tabText label: Text fields: - name: title fieldType: text label: Title - name: textEditor fieldType: richText label: Text editor - name: tabImage label: Image fields: - name: image fieldType: link targetWorkspace: dam appName: assets identifierToPathConverter: class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator contentPreviewDefinition: contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
Node name | Value |
---|---|
<dialog name> | |
actions | |
form | |
tabs | |
tabText | |
fields | |
title | |
fieldType | text |
label | Title |
textEditor | |
fieldType | richText |
label | Text editor |
label | Text |
tabImage | |
fields | |
image | |
fieldType | link |
targetWorkspace | dam |
appName | assets |
identifierToPathConverter | |
class | info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator |
icontentPreviewDefinition | |
class | info.magnolia.dam.app.ui.field.DamFilePreviewComponent |
label | Image |
Nodes and properties:
<dialog name> | required Arbitrary node name. Typically matches the template it edits. For example the component definition node and dialog definition node for a link component could both be named |
| required Contains the form definition which defines the tabs and fields where content is entered. |
| required Contains the tabs within the form. Every dialog needs at least one tab. |
| required The name of the tab. Arbitrary node name. Use a name that describes the content of the tab like |
| required Contains the fields within the tab. See Field definition for more. |
| required Arbitrary field name. Use a name that describes the field like |
or
| required Field definition class (if using |
| optional See Common field properties for a list of optional properties that can be used with all fields. required Each field definition class supports its own properties. See List of fields for properties and example configurations of each field. |
| optional The tab label. Displays in the tab. |
Available field definition classes
fieldType | class |
---|---|
text | info.magnolia.ui.form.field.definition.TextFieldDefinition |
richText | info.magnolia.ui.form.field.definition.RichTextFieldDefinition |
date | info.magnolia.ui.form.field.definition.DateFieldDefinition |
hidden | info.magnolia.ui.form.field.definition.HiddenFieldDefinition |
link | info.magnolia.ui.form.field.definition.LinkFieldDefinition |
code | info.magnolia.ui.form.field.definition.CodeFieldDefinition |
multiValue | info.magnolia.ui.form.field.definition.MultiValueFieldDefinition |
password | info.magnolia.ui.form.field.definition.PasswordFieldDefinition |
select | info.magnolia.ui.form.field.definition.SelectFieldDefinition |
optionGroup | info.magnolia.ui.form.field.definition.OptionGroupFieldDefinition |
twinColSelect | info.magnolia.ui.form.field.definition.TwinColSelectFieldDefinition |
checkbox | info.magnolia.ui.form.field.definition.CheckboxFieldDefinition |
composite | info.magnolia.ui.form.field.definition.CompositeFieldDefinition |
switchable | info.magnolia.ui.form.field.definition.SwitchableFieldDefinition |
static | info.magnolia.ui.form.field.definition.StaticFieldDefinition |
basicUpload | info.magnolia.ui.form.field.definition.BasicUploadFieldDefinition |
damUpload | info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition |
collapsibleComposite | info.magnolia.editor.app.field.CollapsibleCompositeFieldDefinition |
expandingText | info.magnolia.editor.app.field.ExpandingTextFieldDefinition |
Your Magnolia installation may contain more fields depending on the installed modules. Use the Definitions app to see all available field types.