Checkbox

/libs/granite/ui/components/coral/foundation/form/checkbox

A checkbox component.

It extends Field component.

It has the following content structure:

granite:FormCheckbox
  1. granite:commonAttrs
  2. granite:renderCondition
namestring

The name that identifies the field when submitting the form.

deleteHintboolean
  1. true

true to generate the SlingPostServlet @Delete hidden input based on the name.

valuestring

The value of the field.

It is RECOMMENDED that this property is set.

uncheckedValuestring

The submit value of the field when it is unchecked.

It is RECOMMENDED that this property is set.

disabledboolean

Indicates if the field is in disabled state.

requiredboolean

Indicates if the field is mandatory to be filled.

validationstring
multiple

The name of the validator to be applied. E.g. foundation.jcr.name. See validation in Granite UI.

checkedbooleanel

true to pre-check this field, false otherwise.

ignoreDataboolean

If false, the checked state is based on matching the form values by name and value properties. Otherwise, the form values are ignored, and the checked state is based on checked property specified.

textstring
i18n

The text of the checkbox.

autosubmitboolean

true to automatically submit the form when the checkbox is checked/unchecked.

Pressing “enter” in the text field will submit the form (when everything is configured properly). This is the equivalence of that for checkbox.

fieldDescriptionstring
i18n

The description of the component.

tooltipPositionstring
  1. right
  1. left
  2. right
  3. top
  4. bottom

The position of the tooltip relative to the field. Only used when fieldDescription is set.

renderReadOnlyboolean

Renders the read-only markup as well.

Warning

The read-only mode is deprecated.

showEmptyInReadOnlyboolean

Shows read-only version even when it is unchecked.

wrapperClassstring

The class for the wrapper element.