I need to add in the current $form_state
into the ViewsSelection. I have copied the file /core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php
to /modules/custom/fsed_entry/fsed_project_entity_reference_options/src/Plugin/EntityReferenceSelection/ProjectsSelection.php
where I have the file overriding views' implementation. However, I can't seem to figure out how to get $form_state
into my variables so that I can use a value from another form element. I have been trying to experiment with FormCache
but I have not been successful. Any ideas on best approach here?
For background, I need the $form_state
because the field that is being rendered (and this plugin is used on) here was ajaxed in and I want to pass in a value that I can add onto the handler_settings -> view -> arguments
that this plugin uses.