Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

Autocreate for Entity Reference selection handlers that extend ViewsSelection

$
0
0

Problem/Motivation

Autocreate a is a great UX option for Entity Reference fields. Currently it is not available if you choose "Views" as the "Reference method", which is necessary if you want to filter the available choices.

Proposed resolution

Offer autocreate. So far this seems to require
- adapting the ViewsSelection EntityReferenceSelection plugin to offer autocomplete.
- removing a (probably unintended) characteristic of the getAutoCreateBundle method of the EntityReferenceAutocompleteWidget that makes it only work with selection handlers that have a target_bundles property, which ViewsSelection does not.

Remaining tasks

Tests needed.

User interface changes

"Autocreate" Checkbox in the entity reference field settings, and a "Store new items in" dropdown if it checked. These are identical to those for the default reference method.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>