Drop-down Menu: Cliq Native

Drop-down Menu: Cliq Native

The drop-down menu is a clear method of showing a list of data, allowing users to pick their choice from the list. The Cliq native select option can pull up the list of channels, conversations, teams and contacts list from the user's Cliq account directly.  This field again can be categorized into two types based on the choice of selection types offered into single and multi select. The list of attributes passed for this element are given below

Attribute NameData TypeDescription

type*

string
Value should be native_select
The type of input field. For drop-down menu type must be native_select

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)Describe the field display name.
hintstring (100)Provides a brief description of the field's purpose and the expected input
mandatorybooleanDefine if the field's requisite is mandatory or not.
Default value considered is true

data_source*

string
Allowed values: channels | conversations | contacts | teams

Define the source data to be listed as drop down menu items. 

Allowed values are: 

channels | conversations | teams | contacts

valuestring

Provide a default input value for the field. Pass either of the following values:

channel_id | chat_id | team_id | zuid

For multi select, the input values should be comma separated. 

multiplebooleanSet multiple as true, for multi select drop-down field.

max_selections

integer
Maximum selections: 10

Defines the number of options that a user can choose from the drop-down. 

Note: Value for this field defaults to 1 in case of single select drop-downs.

Syntax

 

{
  "type": "native_select",
  "max_selections": "",
  "multiple": true, //Optional, should be true for multi select fields
  "name": "",
  "label": "",
  "hint": "",
  "placeholder": "",
  "mandatory": true, //Optional, default is set as true
  "data_source": "" // Accepted values: channels (or) conversations (or) teams (or) contacts
}

 

Quick Tip:

All input field types given here are explained with a sample code snippet. Try out these snippets by creating a slash command.

 

Code Sample



inputs = list();
inputs.add({"type":"native_select","max_selections":"4","multiple":true,"name":"teammemss","label":"Channel","hint":"Select a channel","placeholder":"Choose channels","mandatory":true,"data_source":"channels"});
inputs.add({"type":"textarea","name":"note","label":"Add notification","hint":"Notes you want to broadcast!","placeholder":"Usage Stats","mandatory":true,"value":"Usage Stats"});
form = {"type":"form","title":"Notify","hint":"Notify multiple conversations","name":"notifier","version":1,"button_label":"Send","action":{"type":"invoke.function","name":"notify"},"inputs":inputs};
return form;

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocliq.com