Skip to content

Script

Script enables forms that can be competed by the user and then passed to a script. The combination provides a lot of flexibility enabling actions.

Atributes

  • title
  • script - script id
  • params
    • name - the name of the parameter passed to the script
    • capture - the type of control used to capture the value
    • title - label for the control
    • options - depends on the type of control

Controls

Control options available

Kind Name Description
field Text field Single line
block Text entry block Multi line
radio Radio controls Single selection; options is string array
checkbox Checkbox controls Single selection; options is string array
dropdown Select control Single selection; options is a string array
map Select control Options is string to string object
map Select control Options is string to string object

Example

{
  "title": "Send a message",
  "script": "5a67e29a-cf0c-4537-bde1-e8a14b505fc5",
  "params": [
    {
      "title": "Send to",
      "type": "string",
      "name": "destination",
      "capture": "map",
      "options": {
        "everyone": "All users",
        "operations": "Operations",
        "staff": "General staff"
      }
    },
    {
      "title": "Send via",
      "type": "string",
      "name": "via",
      "capture": "radio",
      "default": "email",
      "options": [
        "email",
        "text",
        "both"
      ]
    },
    {
      "title": "Subject",
      "type": "string",
      "name": "subject"
    },
    {
      "title": "Message",
      "type": "string",
      "name": "message",
      "capture": "block"
    }
  ]
}