Toggle Input in Forms

The toggle component allows you to switch boolean or true-false values in Cliq Forms. Eg. to simply specify yes or no, or to enable or disable options for an item. 
Toogle Input in Zoho Cliq
 

Attribute NameData TypeDescription
type*
 
String 
Value should be "toggle" 
The type of the input field. Value of the field should be toggle.
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 (50)Describes the display name for this field.
hintString (100)Provides a brief description of the fields purpose and the expected input.
valueBooleanNote: Default toggle state is considered to be false.
trigger_on_changeBooleanDetermines if a form change handler should be triggered when the toggle's value changes.
disabledBooleanControls whether the toggle is interactive or not, allowing or preventing user interaction.

All the mandatory parameters are indicated with a * and the maximum characters allowed is provided with the Data Type.

Sample JSON

{
    "type": "toggle",
    "name": "automated_reports",
    "label": "Automated Reports",
    "hint": "Weekly inventory report: Top-selling items, low stock products and overall sales performance",
    "value": true,
    "trigger_on_change": false,
    "disabled": false
}

Deluge Script - Slash Command 

toggle_input = {"type":"toggle","name":"automated_reports","label":"Automated Reports","hint":"Weekly inventory report: Top-selling items, low stock products and overall sales performance","value":true,"trigger_on_change":false,"disabled":false};
return {"type":"form","title":"Product Notification","name":"product_notification","hint":"Instant notifications for low inventory, stock requests and critical updates.","button_label":"Enable","inputs":{toggle_input},"action":{"type":"invoke.function","name":"formFunc"}};


You can also construct the form using the Form Builder, which lets you build forms by dragging and dropping the toggle inputs and mentioning field properties such as label, unique name, hint, and the default value of the toggle (true or false).
Add Toggle Input in Form Builder in Zoho Cliq