Checkbox ======== .. granite:servercomponent:: /libs/granite/ui/components/coral/foundation/form/checkbox :supertype: /libs/granite/ui/components/coral/foundation/form/field A checkbox component. It extends :granite:servercomponent:`Field ` component. It has the following content structure: .. gnd:gnd:: [granite:FormCheckbox] > granite:commonAttrs, granite:renderCondition /** * The name that identifies the field when submitting the form. */ - name (String) /** * ``true`` to generate the `SlingPostServlet @Delete `_ hidden input based on the name. */ - deleteHint (Boolean) = true /** * The value of the field. * * It is RECOMMENDED that this property is set. */ - value (String) /** * The submit value of the field when it is unchecked. * * It is RECOMMENDED that this property is set. */ - uncheckedValue (String) /** * Indicates if the field is in disabled state. */ - disabled (Boolean) /** * Indicates if the field is mandatory to be filled. */ - required (Boolean) /** * The name of the validator to be applied. E.g. ``foundation.jcr.name``. * See :doc:`validation ` in Granite UI. */ - validation (String) multiple /** * ``true`` to pre-check this field, ``false`` otherwise. */ - checked (BooleanEL) /** * 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. */ - ignoreData (Boolean) /** * The text of the checkbox. */ - text (String) i18n /** * ``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. */ - autosubmit (Boolean) /** * The description of the component. */ - fieldDescription (String) i18n /** * The position of the tooltip relative to the field. Only used when fieldDescription is set. */ - tooltipPosition (String) = 'right' < 'left', 'right', 'top', 'bottom' /** * Renders the read-only markup as well. * * .. warning:: The read-only mode is deprecated. */ - renderReadOnly (Boolean) /** * Shows read-only version even when it is unchecked. */ - showEmptyInReadOnly (Boolean) /** * The class for the wrapper element. */ - wrapperClass (String)