yamlform-container-base-html.html.twig in YAML Form 8
Default theme implementation for a form base container as html.
Available variables:
- element: The form element.
- id: The form element id.
- title: The label for the container.
- value: The content for the container.
- options Associative array of options for element.
- email: Flag to determine if element is for an email.
File
templates/yamlform-container-base-html.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for a form base container as html.
- *
- * Available variables:
- * - element: The form element.
- * - id: The form element id.
- * - title: The label for the container.
- * - value: The content for the container.
- * - options Associative array of options for element.
- * - email: Flag to determine if element is for an email.
- */
- #}
- {% if options.email %}
- <h3>{{ title }}</h3>
- {{ value }}
- {% else %}
- <details data-yamlform-element-id="{{ id }}" open="open">
- <summary role="button" aria-expanded="true" aria-pressed="true">{{ title }}</summary>
- <div class="details-wrapper">{{ value }}</div>
- </details>
- {% endif %}