{% import '_includes/forms' as forms %} {% set nameLabel = nameLabel ?? name ?? null %} {% set handle = handle ?? null %} {% set instructions = instructions ?? null %} {% set instructionsHandle = instructionsHandle ?? handle ?? null %} {% set default = default ?? null %} {% set required = required ?? null %} {% set attribute = attribute ?? null %} {% set field = field ?? null %} {% set fieldClass = fieldClass ?? null %} {# Variables to help with fetching value/defaults and namespacing. Should provide an array that reflects the #} {# mapping data structure. For normal fields, this is just the handle, but Matrix Table, and others are more complex #} {# ie: matrixField.blocks.blockType.fields.field.node - woah! #} {% set path = path ?? [handle] %} {% set namespacePath = path|join('][') %} {% set nodePath = path|join('.') ~ '.node' %} {% set defaultPath = path|join('.') ~ '.default' %} {% set optionsPath = path|join('.') ~ '.options' %} {% set namespace = 'fieldMapping[' ~ namespacePath ~ ']' %} {% set value = hash_get(feed.fieldMapping, nodePath) %} {% set defaultValue = hash_get(feed.fieldMapping, defaultPath) %} {% set classes = classes ?? [] %} {% set elementFields = elementFields ?? null %} {% set isSubElementField = isSubElementField ?? null %} {% if isSubElementField %} {% set classes = classes|merge([ 'element-sub-field' ]) %} {% endif %}
{{ instructions|raw }}
{{ instructionsHandle }}