diff --git a/core/includes/theme.inc b/core/includes/theme.inc index f98df80..7ff0b7d 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2418,6 +2418,12 @@ function template_preprocess_field(&$variables, $hook) { $delta++; } + // We have to know if the field has multiples values to create a simple value + // or a list. + if (count($variables['items']) > 1 ) { + $variables['multiple'] = TRUE; + } + // Add default CSS classes. Since there can be many fields rendered on a page, // save some overhead by calling strtr() directly instead of // drupal_html_class(). diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index a0d527a..6465084 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -33,9 +33,14 @@ {% if not label_hidden %}