Drop-down
The drop-down menu is a clear method of showing a list of data, allowing users to pick their choice from the list.
Attributes | Mandatory | Description | Values |
type | Yes | The type of input to be displayed to the visitor | drop-down |
options | Yes | An array of options you would like to display | [ Note: A maximum of 200 options in the array with a character limit of 80 each can be given. |
placeholder | No | Custom text for option search placeholder | Search for a plan |
multiple | No | To select multiple values | true |
select_label | No | Custom text for the dropdown label, for multi-select dropdown | Pick your plan |
min_selection | No | Minimum selection | 2 |
max_selection | No | Maximum selection | 4 |
Channel compatibility and limitations
Pro Tip: Facebook messenger, Instagram, and WhatsApp channels do not support this card. However, you can handle it differently using the channel value in the visitor map. For example, provide an if condition statement (if the visitor's channel is Facebook or Instagram) and provide the drop-down menu options as a single or multi-select option card.
Output
The above is an example to get the files from the visitor.
Sample code
Copied{
"type": "file",
"min": 1,
"max": 5,
"formats": ["doc", "txt", "docx", "pdf", "html", "js", "css", "ppt", "pptx", "xls", "xlsx", "jpg", "jpeg", "gif", "mp3", "mp4", "3gp", "png", "avi", "aac", "3ga", "amr", "wav", "bmp", "zip", "rar"]
}
Payload (Message object) when a file is uploaded:
Copied{
"meta": {
"card_data": {
"type": "file",
"value": "45d37e0b030bf84e851867fc89461bfe4dfdc6bd2b756c96e"
},
"version": "1"
},
"files": [
"James doc.txt",
"James ID proof.jpg"
],
"text": "James doc.txt",
"type": "files"
}