Loading src/Plugin/Field/FieldWidget/EntityqueueDragtableWidget.php +6 −0 Original line number Diff line number Diff line Loading @@ -335,6 +335,12 @@ class EntityqueueDragtableWidget extends EntityReferenceAutocompleteWidget { // Go two levels up in the form, to the widgets container. $element = NestedArray::getValue($form, array_slice($button['#array_parents'], 0, -2)); // No value inserted on the input or empty value, we don't replace the // 'items-wrapper' element, this will prevent adding empty values. if ($element['add_more']['new_item']['target_id']['#value'] === '') { return $element; } // Remove the submitted value from the 'Add item' textfield. $element['add_more']['new_item']['target_id']['#value'] = NULL; Loading Loading
src/Plugin/Field/FieldWidget/EntityqueueDragtableWidget.php +6 −0 Original line number Diff line number Diff line Loading @@ -335,6 +335,12 @@ class EntityqueueDragtableWidget extends EntityReferenceAutocompleteWidget { // Go two levels up in the form, to the widgets container. $element = NestedArray::getValue($form, array_slice($button['#array_parents'], 0, -2)); // No value inserted on the input or empty value, we don't replace the // 'items-wrapper' element, this will prevent adding empty values. if ($element['add_more']['new_item']['target_id']['#value'] === '') { return $element; } // Remove the submitted value from the 'Add item' textfield. $element['add_more']['new_item']['target_id']['#value'] = NULL; Loading