Create ViewSelection plugin to use config_view in entity_reference field storage parameter

Created on 7 May 2018, over 6 years ago
Updated 24 May 2023, over 1 year ago

Hi here.
First of, thank you for this module. It's a great initiative and I hope it will get in core at some point.

I think it would be really useful to be able to use config_views to filter entity_reference fields.

Use case
I want to create a field to display Blocks.
I want to filter the available Blocks by View (Entity Reference).

Step to reproduce
Create a View:

  • Create a new config_view to list Block
  • On this View, create an Entity Reference display showing at least the Block ID

Create a field:

  • Create a new field of type entity_reference
  • In field storage, select Block
  • In field settings, select "Filter by a Config View"
  • In the display mode, change the field widget from "Autocomplete" to be "Select list"

I've attached a draft patch β†’ for test and review.
I've only been able to test it for a View of type Entity Reference retrieving Blocks entities.

✨ Feature request
Status

Active

Version

9.0

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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