# Dynamic Field Label Drupal 10/11 custom module for existing configurable text fields. No field type, field schema, import or stored data changes are required. ## Installation Place this directory in `web/modules/custom/dynamic_field_label` (or the custom module directory appropriate to your project), then run: ```sh drush en dynamic_field_label -y drush cr ``` Go to `/admin/config/content/dynamic-field-label` and select the fields. The configuration matches machine names across all entity types and bundles. The permission is `administer dynamic field labels`. ## Rendering `Publisher:University of Prince Edward Island` displays as a Publisher label and University of Prince Edward Island value. Only the first colon is a separator. Whitespace around both parts is trimmed. An empty value is permitted; an empty label or missing colon falls back to the existing formatter output. Multiple values each receive their own label. Embedded labels are shown even if the Drupal label is hidden. Labels are escaped plain text and must not contain HTML tags. Values from formatted text fields are rendered through Drupal’s processed_text render element using the stored text format; plain string fields and entries without a format remain escaped plain text. Use input such as `Publisher:UPEI`. Do not wrap the label or entire input in HTML (for example `
Publisher:UPEI
`); such input falls back to the original formatter. Parsed entries display the full value rather than a trimmed formatter or summary. The module provides a field template using standard field CSS classes; a theme can override `field--dynamic-field-label.html.twig`.