"text": label
}
}
+
+def multi_select_block(label, name, placeholder, options, default=None):
+ return {
+ "type": "section",
+ "block_id": name,
+ "text": {
+ "type": "mrkdwn",
+ "text": "*{}*".format(label)
+ },
+ "accessory": {
+ "action_id": name,
+ "type": "multi_static_select",
+ "placeholder": {
+ "type": "plain_text",
+ "text": placeholder
+ },
+ "options": [
+ {
+ "text": {
+ "type": "plain_text",
+ "text": option
+ },
+ "value": option
+ } for option in options
+ ]
+ }
+ }