webform-element-base-text.html.twig in Webform 6.x
Same filename and directory in other branches
Default theme implementation for a webform base element as text.
Available variables:
- element: The webform element.
- title: The label for the element.
- value: The content for the element.
- options Associative array of options for element.
- email: Flag to determine if element is for an email.
- multiline: Flag to determine if value spans multiple lines.
- first: Flag to determine if the element is that first element in its container.
- last: Flag to determine if the element is that last element in its container.
See also
\Drupal\webform\WebformSubmissionViewBuilder::buildElements
File
templates/webform-element-base-text.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for a webform base element as text.
- *
- * Available variables:
- * - element: The webform element.
- * - title: The label for the element.
- * - value: The content for the element.
- * - options Associative array of options for element.
- * - email: Flag to determine if element is for an email.
- * - multiline: Flag to determine if value spans multiple lines.
- * - first: Flag to determine if the element is that first element in its container.
- * - last: Flag to determine if the element is that last element in its container.
- *
- * @see \Drupal\webform\WebformSubmissionViewBuilder::buildElements
- */
- #}
- {% if title %}{{ title }}{% if options.multiline %}:
- {% else %}: {% endif %}{% endif %}{{ value }}
- {% if options.multiline and not options.last %}
-
- {% endif %}