yamlform-composite-name.html.twig in YAML Form 8
Default theme implementation of a name composite form element.
Available variables:
- content: The name form element to be output.
- flexbox: Determines if Flexbox layout should be applied to the composite element.
See also
template_preprocess_yamlform_name()
File
templates/yamlform-composite-name.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation of a name composite form element.
- *
- * Available variables:
- * - content: The name form element to be output.
- * - flexbox: Determines if Flexbox layout should be applied to the composite
- * element.
- *
- * @see template_preprocess_yamlform_name()
- *
- * @ingroup themeable
- */
- #}
- {{ attach_library('yamlform/yamlform.element.composite') }}
- {% if flexbox %}
- <div class="yamlform-flexbox">
- {% if content.title %}
- <div class="yamlform-flex yamlform-flex--2"><div class="yamlform-flex--container">{{ content.title }}</div></div>
- {% endif %}
- {% if content.first %}
- <div class="yamlform-flex yamlform-flex--3"><div class="yamlform-flex--container">{{ content.first }}</div></div>
- {% endif %}
- {% if content.middle %}
- <div class="yamlform-flex yamlform-flex--2"><div class="yamlform-flex--container">{{ content.middle }}</div></div>
- {% endif %}
- {% if content.last %}
- <div class="yamlform-flex yamlform-flex--3"><div class="yamlform-flex--container">{{ content.last }}</div></div>
- {% endif %}
- {% if content.suffix %}
- <div class="yamlform-flex yamlform-flex--1"><div class="yamlform-flex--container">{{ content.suffix }}</div></div>
- {% endif %}
- {% if content.degree %}
- <div class="yamlform-flex yamlform-flex--1"><div class="yamlform-flex--container">{{ content.degree }}</div></div>
- {% endif %}
- </div>
- {% else %}
- {{ content }}
- {% endif %}