This module provides an advanced Entity Reference widget that uses a special select control for selecting items. The select form element options are generated by a view with a special display.
This special display strips out any HTML in the view's row results so that it can be used as select options.
The widget filter text box can be used to limit the number of options using view's filters selected in the widget settings.
When the widget button is clicked, an AJAX call passes the filter text to the selected view's filters and the select form element is refreshed with the view results.
The layout of the widget form elements that constitutes the widget can be configured with css files.
This module also provides an API in the separate module Dynamic Select to use the same select control independently of the field API.

Usage:
1) Create a view listing entities with the display "Dynamic Select" with some non exposed filters.
The view's base table primary key is used to get the entity reference id.
Also make sure your view returns the same entities and bundles as the target you configured in EntityReference.
2) Add an Entity Reference field to your entity with the Dynamic Search widget.
Configure the widget by selecting the view created previously and the relevant filters.
Note that changing the target entity automatically reset the selected view
Specify the labels of the button and input form elements.
Select a layout for the widget. New layouts can be added by copying css files in the folder entityreference_dynamicselect_widget/css

Project information

Releases