You are here

webform-element-base-html.html.twig in Webform 6.x

Same filename and directory in other branches
  1. 8.5 templates/webform-element-base-html.html.twig

Default theme implementation for a webform base element as html.

Available variables:

  • element: The element.
  • title: The label for the element.
  • value: The content for the element.
  • item: The form item used to display the element.
  • options Associative array of options for element.
    • multiline: Flag to determine if value spans multiple lines.
    • email: Flag to determine if element is for an email.

File

templates/webform-element-base-html.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a webform base element as html.
  5. *
  6. * Available variables:
  7. * - element: The element.
  8. * - title: The label for the element.
  9. * - value: The content for the element.
  10. * - item: The form item used to display the element.
  11. * - options Associative array of options for element.
  12. * - multiline: Flag to determine if value spans multiple lines.
  13. * - email: Flag to determine if element is for an email.
  14. */
  15. #}
  16. {% if options.email %}
  17. {% if title %}<b>{{ title }}</b><br />{% endif %}{{ value }}<br /><br />
  18. {% else %}
  19. {{ item }}
  20. {% endif %}