You are here

webform.html.twig in Webform 6.x

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

Theme implementation for a 'webform' element.

This is an copy of the webform.html.twig theme_wrapper which includes the 'title_prefix' and 'title_suffix' variables needed for contextual links to appear.

Available variables

  • attributes: A list of HTML attributes for the wrapper element.
  • children: The child elements of the webform.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.

See also

template_preprocess_webform()

_webform_form_after_build()

File

templates/webform.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation for a 'webform' element.
  5. *
  6. * This is an copy of the webform.html.twig theme_wrapper which includes the
  7. * 'title_prefix' and 'title_suffix' variables needed for
  8. * contextual links to appear.
  9. *
  10. * Available variables
  11. * - attributes: A list of HTML attributes for the wrapper element.
  12. * - children: The child elements of the webform.
  13. * - title_prefix: Additional output populated by modules, intended to be
  14. * displayed in front of the main title tag that appears in the template.
  15. * - title_suffix: Additional output populated by modules, intended to be
  16. * displayed after the main title tag that appears in the template.
  17. *
  18. * @see template_preprocess_webform()
  19. * @see _webform_form_after_build()
  20. *
  21. * @ingroup themeable
  22. */
  23. #}
  24. <form{{ attributes }}>
  25. {{ title_prefix }}
  26. {{ children }}
  27. {{ title_suffix }}
  28. </form>