Table of Contents

Field Input-Type entity-query

Use this field type for configuring an entity-picker storing relationships. It's an extension of the entity field type.

The special thing about this is that the items shown for selecting are retrieved from Query and not based on a content-type name. This allows you to look up any kind of data and offer it for selection.

Features

  1. provide values to select from a query
  2. optionally specify other streams than Default
  3. optionally provide query parameters
  4. optionally use tokens in query-parameters, to pass on values from other fields in the form
  5. todo/maybe data is lazy loaded, so the query is only hit when the dropdown is opened

Configuring an Entity-Query

This shows the configuration dialog:

  1. Query the name of the query to use
  2. Advanced
  3. Parameters a string like country=Switzerland or country=[Country] to parameterize the query
  4. Stream Name the stream name, in case you don't want the Default stream

In addition to these settings, you also have the basic entity settings which enhance the features you are using here.

Cascading Dropdowns

Dropdown-Fields can be cascaded - so that a selection on one dropdown changes the list of possible items on another dropdown. You'll have to work with the Parameters to get this to fly. S

Important Notes

Note that this stores item-relationships so you can only use it to select items which exist in the 2sxc/EAV database. You cannot use it to select items provided from non-entity sources, like Sql-data or File-lists. To select such data, you'll need the String-Dropdown-Query instead.

History

  1. Introduced in EAV 4.x 2sxc 9.11