Single-line Input Type: Email
To create a single-line input field of the type, email - use the format key and define the field value as email. The list of attributes passed for this input field type is given below. All mandatory attributes are indicated with a * and the maximum characters allowed is provided with the Data Type.
Attribute Name | Data Type & Limit | Description |
type* | String
| The type of input field. For single line text input, type must be text |
format | String Value should be email | Use this key to define the text field format. Value for the input type email should email |
placeholder* | String (100) | 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. On form submission, the value defined for this key will be available in the function associated with the form. |
label* | String (50) | Describes the field display name. |
hint | String (100) | Provides a brief description of the field's purpose and the expected input. |
max_length | Integer | Specifies the maximum number of characters allowed as input. |
min_length | Integer | Specifies the minimum number of characters allowed as input. |
value | String (100) | Provide a default input value for the field. |
mandatory | Boolean | Define if the field's requisite is mandatory or not. Default value considered is true. |
Syntax
{
"type": "text",
"format" : "email",
"name": "",
"label": "",
"hint": "",
"placeholder": "",
"mandatory":true , //boolean, default is true
"value": "",
"max_length": "",
"min_length": ""
}
Code Sample
{
"type":"form",
"title":"ZylCal Users",
"name":"zylcalUsers",
"hint":"Submit your details to get early access to ZylTrix!",
"button_label":"Submit",
"inputs":[
{
"label":"Email",
"name":"email",
"placeholder":"scott.fisher@example.com",
"hint":"Give your registered email address",
"min_length":"0",
"max_length":"100",
"mandatory":true,
"type":"text",
"format":"email"
}
],
"action":{
"type":"invoke.function",
"name":"function"
}
}