Loading sam.module +2 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,8 @@ function sam_field_widget_multivalue_form_alter(array &$elements, FormStateInter // We only have something to simplify if the maximum cardinality hasn't // already been reached. $should_simplify = FALSE; foreach (Element::children($elements) as $delta) { $deltas = array_filter(Element::children($elements), 'is_numeric'); foreach ($deltas as $delta) { $item = $items->get($delta); // We trust the field telling us it's empty or not. Also, when the field // has 0 values, we leave the first empty element visible, so we only Loading Loading
sam.module +2 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,8 @@ function sam_field_widget_multivalue_form_alter(array &$elements, FormStateInter // We only have something to simplify if the maximum cardinality hasn't // already been reached. $should_simplify = FALSE; foreach (Element::children($elements) as $delta) { $deltas = array_filter(Element::children($elements), 'is_numeric'); foreach ($deltas as $delta) { $item = $items->get($delta); // We trust the field telling us it's empty or not. Also, when the field // has 0 values, we leave the first empty element visible, so we only Loading