Telephone
To create an input field of the type, telephone—use the format key and define the field value as tel. The list of attributes passed for this input field type is given below.
Attribute Name | Datatype | Description |
type* | String (Value should be tel) | The type of the input field. Value of the field should be tel. |
placeholder* | String (150) | Sample field value displayed to the user that describes the expected value of the input field. |
name* | String (50) | A unique identifier for the field. Upon form submission, value defined for this key will be available in the function associated with the form. |
label* | String (150) | Describes the display name for this field. |
hint | String (100) | Provides a brief description of the fields purpose and the expected input. |
max_length | Integer | Specifies the maximum number of characters allowed as input. Note: It is recommended to set this value keeping in mind the international format of telephone number |
min_length | Integer | Specifies the minimum number of characters allowed as input. |
value | String(2048) | Provide a default input value for the field. |
mandatory | Boolean | Defines if the field's requisite is mandatory or not. Note: Default value is considered to be false. |
disabled | Boolean | If disabled is true, then the field will not be editable |
Sample Code:
Copied{
"type":"tel",
"name":"tel",
"label":"Contact Number",
"placeholder":"01234567890",
"hint":"Please enter your contact number",
"value":"01234567890",
"mandatory":false,
"max_length":100,
"min_length":10,
"disabled" : true
}
JSON format passed in handlers for the filled-in value:
Copied{
"meta":{
"phone":"01234567890",
"type":"tel",
"value":"01234567890"
},
"value":"+1 01234567890"
}