Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2019 at 14:54 UTC
Updated:
30 Jul 2019 at 09:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dagomar commentedComment #3
dagomar commentedComment #4
jrockowitz commentedComment #5
jrockowitz commentedDoes the attached patch accomplish the same goal of passing the webform submission to the entity reference select plugin without adding the extra parameter?
Comment #6
casey commentedYes that would work. This patch also contains the actual passing of the entity to the selection handler.
Comment #7
jrockowitz commentedWe still need to support PHP 6 until 8.7 is the only support version, therefore I change ?? to ?:
Comment #8
jrockowitz commentedNow that I am reviewing the changes from #6, I am not sure why you can't use '_webform_settings'.
Comment #9
jrockowitz commentedThe patch from #5 was (accidentally) committed via #3050592: Add "day of week" validation for date elements
@see https://www.drupal.org/commitlog/commit/296/5008dacb50c9dee9c52fbc15c3cc...
Comment #11
casey commented'entity' is a (undocumented) default option. See \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager::getSelectionHandler()
Even though webform elements are no real entity fields, they (their values) do belong to webform submissions. Selection handlers can use this information to filter the referenceable entities.
Comment #12
casey commentedComment #13
casey commentedSee #3071295: Pass webform submission as 'entity' to selection handler instead