Autocreate for Entity Reference selection handlers that extend ViewsSelection

Created on 15 September 2016, over 8 years ago
Updated 19 February 2023, almost 2 years ago

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.

Feature request
Status

Needs work

Version

10.1

Component
Views 

Last updated about 2 hours ago

Created by

🇬🇧United Kingdom jonathanshaw Stroud, UK

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024