Advertising sustains the DA. Ads are hidden for members. Join today

Configuration

Last updated on
3 November 2021

This documentation needs work. See "Help improve this page" in the sidebar.

Installation

Install as you would normally install a contributed Drupal module. Visit the [Drupal Installation Guide](https://www.drupal.org/node/1897420) for further information.

The Select 2 module is a requirement, so if you're not installing the module using composer, you'll need to also download and install it manually.

The Select 2 module requires the Select 2 library. Download the latest stable version from the Github repo, and unzip it in your libraries folder. If you don't have a libraries folder, create it in your site root (in the same directory as the modules folder). After unzipping it, rename it to "select2", so the directory should be "/libraries/select2".

Configuration

This module adds a new widget that builds off of the entity reference autocomplete widget. The design is intended to include a display of a view in the form display.

Example

  1. Create a new view of the type `entity_reference_field_attachment` based on the target entity type
  2. Make this view display a table
  3. Populate table with fields to display
  4. Navigate to configure an entity
  5. Add an entity reference field that uses the widget: `Autocomplete (Views)`
  6. Navigate to the `Manage form display` tab
  7. Open the settings for the Autocomplete (Views) field
  8. The `View` dropdown will have options for all pertinent views
  9. Select the desired view
  10. The selected view will now display on the entity form underneath the autocomplete widget

Help improve this page

Page status: Needs work

You can: