File size: 1,675 Bytes
d2897cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% 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),
}) -}}