Single-line Input Field : Number
| Attribute Name | Data Type | Description |
| type* | string Value should be number | The type of input field. For single line text input, type must be number. |
| 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 | integer | Specifies the maximum value allowed as input. |
| min | integer | Specifies the minimum value allowed as input. |
| step_value | integer | Displays a counter to increase or decrease numerical values in the field. |
| 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": "",
"name": "",
"label": "",
"hint": "",
"placeholder": "",
"mandatory": true, //boolean, default is set to true
"value": "",
"max": "",
"min":""
}
Code Sample
inputs = list();
inputs.add(
{
"type": "number",
"name": "ticket_details",
"label": "Ticket ID",
"hint": "Please enter your ticket ID",
"placeholder": "1234",
"mandatory": true,
"step_value":2,
"value": "101",
"max": "10000",
"min": "100"
});
form = {
"type": "form",
"title": "Zylker Support",
"hint": "Submit ticket details to get instant support 🎧",
"name": "ID",
"version": 1,
"button_label": "Submit",
"action": {
"type": "invoke.function",
"name": "userinfo"
},
"inputs": inputs
};
return form;
