{% if field.defaultValue is defined and field.defaultValue is not empty %}

{#
    This field relies on the `hidden.html.twig` implementation.

    Mautic tries to render `@themes/{{theme}}/html/MauticFormBundle/Field/hidden.html.twig`
    and falls back to the standard template '@MauticForm/Field/hidden.html.twig'.

    This eliminates the need to copy twig templates into themes that just rely on one base template file.
#}
    {{- include([theme|default('') ~ 'hidden.html.twig', '@MauticForm/Field/hidden.html.twig'], {
            'field': field,
            'fields': fields|default([]),
            'inForm': inForm|default(false),
            'id': id,
            'formId': formId|default(0),
            'type': 'checkbox',
            'formName': formName|default(''),
            'mappedFields': mappedFields|default([]),
    })|replace({
            '<input': '<input value="' ~ field.defaultValue ~ '"',
    })|raw -}}
{% endif %}
{#
    This field relies on the `group.html.twig` implementation.

    Mautic tries to render `@themes/{{theme}}/html/MauticFormBundle/Field/group.html.twig`
    and falls back to the standard template '@MauticForm/Field/group.html.twig'.

    This eliminates the need to copy twig templates into themes that just rely on one base template file.
#}
{{- include([theme|default('') ~ 'group.html.twig', '@MauticForm/Field/group.html.twig'], {
        'field': field,
        'inForm': inForm|default(false),
        'id': id,
        'formId': formId|default(0),
        'type': 'checkbox',
        'formName': formName|default(''),
        'mappedFields': mappedFields|default([]),
        'fields': fields|default(null),
}) -}}
