PhoneAndAreaCode
A phone number field with a selectable international area code. The field renders
a select box containing all international dial codes (e.g. +49) next to a
text field for the phone number itself.
The list of area codes is loaded from
EXT:lia_form/Configuration/Data/PhoneAreaCodeList.json. Each entry consists
of a country name, the dial code and the ISO country code:
{
"name": "Germany",
"dial_code": "+49",
"code": "DE"
}
Copied!
To use a custom data source, subscribe to the BeforePhoneAreaCodeInitializeEvent and set your own path to a JSON file with the same structure.
label
-
- Type
- string
- propertyPath
- label
The field label
elementDescription
-
- Type
- string
- propertyPath
- properties.elementDescription
The field description.
areaCodeClass
-
- Type
- string
- propertyPath
- properties.areaCodeClass
CSS class added to the area code select box.
class
-
- Type
- string
- propertyPath
- properties.class
CSS class added to the phone number text field.
gridColumnViewPortConfiguration
-
- Type
- GridColumnViewPortConfigurationEditor
Grid settings.
requiredValidator
-
- Type
- RequiredValidatorEditor
- propertyPath
- properties.fluidAdditionalAttributes.required
Field validation settings.