Tel¶
The “Tel” type generates a simple <input>
field, which handles phone numbers.
It corresponds with the TCA type='input'
(default), however special
variants are defined as own field types.
Properties¶
- autocomplete
| Required: false | Type: boolean | Default: ‘false’ |
Controls the autocomplete attribute of a given input field. If set to true (default false), adds attribute autocomplete=”on” to the input field allowing browser auto filling the field.
- default
| Required: false | Type: integer | Default: 0 |
Default value set if a new record is created.
- required
| Required: false | Type: boolean | Default: ‘false’ |
If set, the field will become mandatory.
- size
| Required: false | Type: integer | Default: ‘20’ |
Abstract value for the width of the
<input>
field.- trim
| Required: false | Type: boolean | Default: ‘false’ |
If set, the PHP trim function is applied on the field’s content.
- valuePicker
| Required: false | Type: array | Default: ‘’ |
Renders a select box with static values next to the input field. When a value is selected in the box, the value is transferred to the field. Keys:
- items (array)
- An array with selectable items. Each item is an array with the first being the value transferred to the input field, and the second being the label in the select drop-down (LLL reference possible).
Example:
valuePicker: items: '+49 111 111111-11': Contact 1 '+49 111 111111-12': Contact 2 '+49 111 111111-13': Contact 3
Example¶
group: common
fields:
- identifier: tel
type: Tel
properties:
autocomplete: true
default: 0
required: false
size: 20
trim: true
valuePicker:
items:
'+49 111 111111-11': Contact 1
'+49 111 111111-12': Contact 2
'+49 111 111111-13': Contact 3