Text or Entity
Categories
Component ID
2499833
Component name
Text or Entity
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
This module provides a hybrid field type that accepts either text or entity reference as its value, allowing fields to optionally reference arbitrary entities via their label.
Features
- Allowed entity type / bundles and maximum length of text value are configured in field settings.
- User entity selection can be based on target user role(s) in addition to entity type and bundle(s).
- Autocomplete widget combines results based on previously entered text values and labels of allowed / accessible entity references. Limit on the number of suggestions and match operator (starts with / contains) are configured in widget settings.
- Field formatter optionally displays label as link to referenced entity if one exists and if user has view access rights, or as text otherwise.
- Inserting, updating or deleting referenced entities also updates field values where they are referenced, so changing the node title also changes the text value on a field referencing that node as would be expected.
- Support for the Real Name module is transparent to the user.
- Views integration exposes direct and reverse relationships just like regular entity references.
- Feeds integration allows importing either text value(s) or entity ID.
Requirements
- Entity API 1.x
Recommended modules
Similar modules
- This module was first inspired by the Text or Nodereference module, but overcomes its limitation to node references by integrating with Entity API and Real Name (plus it also supports Feeds and Views!).
- Entity reference offers more flexibility when it comes to entity selection (i.e. filter by an entityreference view), but doesn't allow text values with optional referencing. Also, with Text or Entity, importers can handle entity labels directly without the need for feeds tampering.
- While Entity Reference Autocomplete provides entityreference form element to developers, it doesn't allow optional referencing either.
Known issues
- Support for Field collection is missing.
