Multi-line Input Field

The list of attributes required for a multi-line input field type are given below:  

Attribute NameData TypeDescription
type*textareaThe type of input field. For multi line text input, type must be textarea.
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.
hintstring (100)Provides a brief description of the field's purpose and the expected input.
max_lengthinteger (5000)Specifies the maximum number of characters allowed as input. If no limit is defined, the default value will be taken as 1000
min_lengthintegerSpecifies the minimum number of characters allowed as input.
valuestring (1000)Value to be passed as input in the field. 
mandatorybooleanDefine if the field's requisite is mandatory or not.
Default value considered is true.

Syntax


{
  "type": "textarea",
  "name": "",
  "label": "",
  "hint": "",
  "placeholder": "",
  "mandatory": true// boolean, default is set to true,
  "value": "",
  "max_length":"",
  "min_length:""
}

Code Sample


inputs = list();
inputs.add(
{
  "type": "textarea",
  "name": "note",
  "label": "Add note",
  "hint": "Notes you add goes into your default notebook!",
  "placeholder": "To be done by Tuesday",
  "mandatory": true,
  "value": "Upcoming blog schedule!"
});
form = {
  "type": "form",
  "title": "Note Taker",
  "hint": "This is a shortcut to add notes to your notebook!",
  "name": "ID",
  "version": 1,
  "button_label": "Save Note",
  "action": {
      "type": "invoke.function",
      "name": "notes"
  },
  "inputs": inputs
};
return form;