Configuration root: nowo_barcode_input
- Bundle configuration
- Options
- form_theme
- Supported formats
- Per-field overrides
- Assets package
- Translations
- Translation overrides
# config/packages/nowo_barcode_input.yaml
nowo_barcode_input:
enable_scanner: true
max_length: 128
trim_whitespace: true
formats: ['ean_13', 'ean_8', 'code_128', 'code_39', 'upc_a']
facing_mode: environment
form_theme: 'bootstrap_5_layout.html.twig'| Key | Type | Default | Description |
|---|---|---|---|
enable_scanner |
bool | true |
Show the camera scan button in the widget. |
max_length |
int | 128 |
Maximum barcode length (1–256). |
trim_whitespace |
bool | true |
Trim leading/trailing whitespace on submit. |
formats |
list | see above | Supported symbologies for scanner hints. |
facing_mode |
string | environment |
Camera facing mode: environment or user. |
form_theme |
string | form_div_layout.html.twig |
Twig form theme mapped to bundle themes. |
Supported values:
form_div_layout.html.twigform_table_layout.html.twigbootstrap_5_layout.html.twigbootstrap_5_horizontal_layout.html.twigbootstrap_4_layout.html.twigbootstrap_4_horizontal_layout.html.twigbootstrap_3_layout.html.twigbootstrap_3_horizontal_layout.html.twigfoundation_5_layout.html.twigfoundation_6_layout.html.twigtailwind_2_layout.html.twig
ean_13ean_8upc_aupc_ecode_128code_39itfcodabar
See USAGE.md for BarcodeType field options.
The bundle registers the Symfony asset package nowo_barcode_input:
<script src="{{ asset('barcode-input.js', 'nowo_barcode_input') }}"></script>The bundle ships strings under src/Resources/translations/ for:
en,es,de,fr,it,nl,pt
Symfony loads them from the NowoBarcodeInputBundle domain when the Translator component is enabled in your application. No extra bundle configuration is required.
Keys:
scan.button: 'Scan'
scan.close: 'Close'
scan.hint: 'Point the camera at a barcode'
field.placeholder: 'Enter or scan a barcode'To override catalogue entries in the host application:
- Use the same domain:
NowoBarcodeInputBundle. - Create an app file such as
translations/NowoBarcodeInputBundle.es.yaml(or.xlf). - Override only the keys you need. Missing keys fall back to the bundle catalogue.
Example:
# translations/NowoBarcodeInputBundle.es.yaml
scan.button: 'Escanear'
field.placeholder: 'Introduce o escanea un código de barras'