{# ------------------------ #} {# Available Variables #} {# ------------------------ #} {# Attributes: #} {# type, name, handle, instructions, attribute, default, feed, feedData #} {# ------------------------ #} {# Fields: #} {# name, handle, instructions, feed, feedData, field, fieldClass #} {# ------------------------ #} {% import 'feed-me/_macros' as feedMeMacro %} {% import '_includes/forms' as forms %} {% if field.useMultipleFields %} {# Special case when inside another complex field (Matrix) #} {% if parentPath is defined %} {% set prefixPath = parentPath %} {% else %} {% set prefixPath = [handle] %} {% endif %} {% set classes = ['complex-field'] %}
{% namespace 'fieldMapping[' ~ prefixPath | join('][') ~ ']' %} {% endnamespace %}
{% for option in field.getFields() %} {% if option.enabled %} {% set nameLabel = option.label %} {% set instructionsHandle = handle ~ '[' ~ option.handle ~ ']' %} {% set path = prefixPath | merge ([ 'fields', option.handle ]) %} {% set default = default ?? { type: 'text', } %} {% embed 'feed-me/_includes/fields/_base' %} {% block additionalFieldSettings %} {% endblock %} {% block fieldSettings %} {% endblock %} {% endembed %} {% endif %} {% endfor %} {% else %} {% include 'feed-me/_includes/fields/_base' %} {% endif %}