Versions Compared

Key

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

Checkbox field definition renders CheckBoxFieldDefinition renders a single checkbox. It is a simpler alternative to Javadoc resource linkclassNameinfo.magnolia.ui.field.CheckBoxGroupFieldDefinitionrenderTypeasynchronous.

Info

Checkbox This checkbox field definition is part of the Magnolia 6 UI framework. The fully qualified class name is info.magnolia.ui.field.CheckBoxFieldDefinition.

If you work with the Magnolia 5 UI framework, see Checkbox field for Magnolia 5 UI instead.

Table of Contents

Example

...

definition

Code Block
languageyml
checkbox:
  $type: checkBoxField
  label: Show title
  buttonLabel: Select to display title

Checkbox field properties

Field properties

Field-specific properties

buttonLabel

required

Label displayed next to the checkbox. The value is i18n-able.

If

<field name>Name of the field.

class

required (unless $type is used)

Fully qualified name of the checkbox field definition class.

If the definition class is annotated with info.magnolia.ui.field.FieldType, you can use the $type property instead.

$type

You can use this as a shortcut for class if the definition class is annotated with info.magnolia.ui.field.FieldType. The proper value is defined by the annotation.

Code Block
languagejava
titleExample class annotation
collapsetrue
@FieldType("checkBoxField")
public class CheckBoxFieldDefinition extends ConfiguredFieldDefinition<Boolean> {
...
}

To use the $type property in YAML, see Checkbox field - 6 UI.

buttonLabel

optional

Label displayed to the right of the checkbox.

(warning) The property is optional in the sense that if you do not want to have the any label rendered at all, you have to set , set the property to an empty string as its value (either in the YAML configuration or in a message bundle).

Common simple field properties

Include Page
_Common simple field properties
_Common simple
See also Common
field properties
.