{% macro checkbox(config) %}
    {%- spaceless %}

    {% set value = (config.value is defined ? config.value : 1) %}
    {% set id = (config.id is defined and config.id ? config.id : 'checkbox' ~ random()) %}
    {% set label = (config.label is defined ? config.label) %}

    <div class="field checkboxfield">
        <input type="checkbox" value="{{ value }}"
            {%- if id %} id="{{ id }}"{% endif %}
            class="checkbox"
            {%- if config.name is defined %} name="{{ config.name }}"{% endif %}
            {%- if config.checked is defined and config.checked %} checked{% endif %}>

        <label for="{{ id }}">{{ label | raw }}</label>
    </div>

    {% endspaceless -%}
{% endmacro %}

{% macro fieldCanBeUniqueId(field) %}
    {%- spaceless %}
        {% set supportedFieldTypes = [
            'attribute',
            'craft\\fields\\Checkboxes',
            'craft\\fields\\Color',
            'craft\\fields\\Date',
            'craft\\fields\\Dropdown',
            'craft\\fields\\Email',
            'craft\\fields\\Lightswitch',
            'craft\\fields\\MultiSelect',
            'craft\\fields\\Number',
            'craft\\fields\\PlainText',
            'craft\\fields\\RadioButtons',
            'craft\\fields\\Url',
        ] %}

        {% set type = field.type ?? 'attribute' %}

        {% if type in supportedFieldTypes %}
            true
        {% endif %}
    {% endspaceless -%}
{% endmacro %}



{% macro checkbox(config) %}
    {%- spaceless %}

    {% set value = (config.value is defined ? config.value : 1) %}
    {% set id = (config.id is defined and config.id ? config.id : 'checkbox' ~ random()) %}
    {% set label = (config.label is defined ? config.label) %}

    <div class="field checkboxfield">
        <input type="checkbox" value="{{ value }}"
            {%- if id %} id="{{ id }}"{% endif %}
            class="checkbox"
            {%- if config.name is defined %} name="{{ config.name }}"{% endif %}
            {%- if config.checked is defined and config.checked %} checked{% endif %}>

        <label for="{{ id }}">{{ label | raw }}</label>
    </div>

    {% endspaceless -%}
{% endmacro %}

{% macro fieldCanBeUniqueId(field) %}
    {%- spaceless %}
        {% set supportedFieldTypes = [
            'assets',
            'attribute',
            'craft\\fields\\Checkboxes',
            'craft\\fields\\Color',
            'craft\\fields\\Date',
            'craft\\fields\\Dropdown',
            'craft\\fields\\Email',
            'craft\\fields\\Lightswitch',
            'craft\\fields\\MultiSelect',
            'craft\\fields\\Number',
            'craft\\fields\\PlainText',
            'craft\\fields\\RadioButtons',
            'craft\\fields\\Url',
        ] %}

        {% set type = field.type ?? 'attribute' %}

        {% if type in supportedFieldTypes %}
            true
        {% endif %}
    {% endspaceless -%}
{% endmacro %}



Fix not being able to select filename as an identifier for asset fields
Fix not being able to select filename as an identifier for asset fields
