Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 2.61 KB

File metadata and controls

76 lines (58 loc) · 2.61 KB

Configuration

# config/packages/nowo_tag_input.yaml
nowo_tag_input:
  value_format: array
  trim: true
  duplicates: false
  dropdown_enabled: true
  placeholder: ''
  form_theme: 'bootstrap_5_layout.html.twig'

Options

Key Default Description
value_format array Model format: array or string (comma-separated)
trim true Trim whitespace from each tag
pattern null Optional regex pattern (without delimiters)
whitelist [] Allowed tag values
duplicates false Allow duplicate tags
max_tags null Maximum number of tags
dropdown_enabled true Enable Tagify dropdown for whitelist
placeholder '' Default placeholder
form_theme form_div_layout.html.twig Twig form theme base layout

form_theme

Supported values:

  • form_div_layout.html.twig
  • form_table_layout.html.twig
  • bootstrap_5_layout.html.twig
  • bootstrap_5_horizontal_layout.html.twig
  • bootstrap_4_layout.html.twig
  • bootstrap_4_horizontal_layout.html.twig
  • bootstrap_3_layout.html.twig
  • bootstrap_3_horizontal_layout.html.twig
  • foundation_5_layout.html.twig
  • foundation_6_layout.html.twig
  • tailwind_2_layout.html.twig

Translations

Translation domain: NowoTagInputBundle (CamelCase, matching the bundle name).

The bundle ships YAML files for en, es, de, fr, it, nl, and pt under src/Resources/translations/. Symfony loads application translations first; missing keys fall back to the bundle.

How to override (application)

  1. Use the same domain: NowoTagInputBundle.
  2. Create a file in your application:
    • translations/NowoTagInputBundle.<locale>.yaml (or .xlf if your project uses XLF).
  3. Override only the keys you need. Keys not defined in the app file use the bundle default.

Example — Spanish override:

# translations/NowoTagInputBundle.es.yaml
tag:
  placeholder: 'Añade etiquetas y pulsa Enter'
  1. Clear the Symfony cache in dev if translations do not appear: php bin/console cache:clear.

TagType uses translation_domain: NowoTagInputBundle by default. Override per field with the standard Symfony translation_domain form option.

Twig overrides

REQ-TWIG-001. Namespace: NowoTagInputBundle. Full procedure, freeze rule, and the overridable <subpath> table: USAGE.md — Overriding templates. Theme selection follows form_themeform_theme.