This simple module allows to configure link widgets to automatically copy the referenced item's label into the field text, if empty.
If you have enabled the maxlength module in the link text element, this module will honor that setting and only copy the number of characters allowed by the maxlength options.
Configuration
- Install the module
- Navigate to the form display, and open the link widget configuration options.
- Choose "Auto-fill the link text with the referenced entity label, if empty."
Theme compatibility
This module has only been tested in the Claro admin theme. If incompatibility with other themes is found, patches are welcome in the issue queue.
Non-empty text
This module will only affect empty text elements, by design. This means that if you select a referenced node, and then select another one, the second title will NOT be auto-filled. This is intended to prevent data loss when editors manually specify the title first (or change from external to internal URL), and want to preserve the manual value when selecting an internal reference. There is no (easy) way to distinguish between manually-entered titles versus auto-filled ones, so this module deliberately only auto-fills when the title element is empty.
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.- Project categories: Site structure
6 sites report using this module
- Created by marcoscano on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.

