You are here

input.html.twig in Drupal 8

Theme override for an 'input' #type form element.

Available variables:

  • attributes: A list of HTML attributes for the input element.
  • children: Optional additional rendered elements.

File

core/themes/claro/templates/form/input.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for an 'input' #type form element.
  5. *
  6. * Available variables:
  7. * - attributes: A list of HTML attributes for the input element.
  8. * - children: Optional additional rendered elements.
  9. *
  10. * @see template_preprocess_input()
  11. * @see claro_preprocess_input()
  12. */
  13. #}
  14. {% spaceless %}
  15. {% if autocomplete_message %}
  16. <div class="claro-autocomplete">
  17. <input{{ attributes }}/>
  18. <div hidden class="claro-autocomplete__message">{{autocomplete_message}}</div>
  19. </div>
  20. {{ children }}
  21. {% else %}
  22. <input{{ attributes }}/>{{ children }}
  23. {% endif %}
  24. {% endspaceless %}