You are here

input.html.twig in Drupal 9

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. {% apply spaceless %}
  15. {% if autocomplete_message %}
  16. <div class="claro-autocomplete">
  17. <input{{ attributes }}/>
  18. <div class="claro-autocomplete__message hidden" data-drupal-selector="autocomplete-message">{{ autocomplete_message }}</div>
  19. </div>
  20. {{ children }}
  21. {% else %}
  22. <input{{ attributes }}/>{{ children }}
  23. {% endif %}
  24. {% endapply %}