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

label
Type
string
propertyPath
label

The field label

elementDescription

elementDescription
Type
string
propertyPath
properties.elementDescription

The field description.

areaCodeClass

areaCodeClass
Type
string
propertyPath
properties.areaCodeClass

CSS class added to the area code select box.

class

class
Type
string
propertyPath
properties.class

CSS class added to the phone number text field.

gridColumnViewPortConfiguration

gridColumnViewPortConfiguration
Type
GridColumnViewPortConfigurationEditor

Grid settings.

requiredValidator

requiredValidator
Type
RequiredValidatorEditor
propertyPath
properties.fluidAdditionalAttributes.required

Field validation settings.