diff -u b/core/modules/field/field.form.inc b/core/modules/field/field.form.inc --- b/core/modules/field/field.form.inc +++ b/core/modules/field/field.form.inc @@ -21,9 +21,9 @@ */ function template_preprocess_field_multiple_value_form(&$variables) { $element = $variables['element']; - $variables['multiple_cardinality'] = $element['#cardinality_multiple']; + $variables['multiple'] = $element['#cardinality_multiple']; - if ($variables['multiple_cardinality']) { + if ($variables['multiple']) { $table_id = drupal_html_id($element['#field_name'] . '_values'); $order_class = $element['#field_name'] . '-delta-order'; diff -u b/core/modules/field/field.module b/core/modules/field/field.module --- b/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -8,6 +8,7 @@ use Drupal\Core\Template\Attribute; use Drupal\field\FieldInterface; use Drupal\field\FieldInstanceInterface; +use Drupal\Component\Utility\String; /* * Load all public Field API functions. Drupal currently has no @@ -629,7 +630,7 @@ $variables['label_hidden'] = ($element['#label_display'] == 'hidden'); // Always set the field label - allow themes to decide whether to display // In addition the label should be rendered but hidden to support screen readers - $variables['label'] = check_plain($element['#title']); + $variables['label'] = String::checkPlain($element['#title']); // We want other preprocess functions and the theme implementation to have // fast access to the field item render arrays. The item render array keys diff -u b/core/modules/field/templates/field-multiple-value-form.html.twig b/core/modules/field/templates/field-multiple-value-form.html.twig --- b/core/modules/field/templates/field-multiple-value-form.html.twig +++ b/core/modules/field/templates/field-multiple-value-form.html.twig @@ -4,13 +4,13 @@ * Default theme implementation for an individual form element. * * Available variables for all fields: - * - multiple_cardinality: Whether the field is multiple cardinality or not. + * - multiple: Whether there are multiple instances of the field. * * Available variables for single cardinality fields: * - elements: Form elements to be rendered. * - * Available variables for multiple cardinality fields: - * - table: Table of field items for multiple cardinality fields. + * Available variables when there are multiple fields. + * - table: Table of field items. * - description: Description text for the form element. * - button: "Add another item" button. * @@ -19,7 +19,7 @@ * @ingroup themeable */ #} -{% if multiple_cardinality %} +{% if multiple %}
{{ table }} {% spaceless %}