I want to develop a feature such a way that user can select multiple options from message menu. Is it possible to select multiple options from the interactive menu at the same time ??
Message menus can even be dynamically populated with options based on your server's response. To create messages with message menus and respond to user selections, you'll need a Slack app set up with a functional interactive message Request URL.
A Slack app is required. Whether using buttons, actions, or menus, interactive messages flow like so: A message exists, ready for action. If your app created it, it might have buttons, or it might have menus, and if it's not ephemeral it might have custom actions available. Now all the users who can read it can interact with it.
Actions are interactions in Slack that generate an HTTP request to your app. These are: Block actions: A user interacted with one of the interactive components in a message built with block elements. Message actions: A user selected an action in the overflow menu of a message.
There's a new way to promote more nuanced decision-making. Instead of buttons, users encounter drop downs, each containing a series of options: perhaps a list of fellow members, a list of Slack channels, or a simple list of actions you provide while creating the message.
You can currently only select one option. Slack does not support choosing more than one option in a message.
But there are 2 alternatives:
Dialogs are modal and allow you to use up to 10 elements each including select menus. And they have a "submit" and "cancel" button.
This allows you to implement exactly what you are asking, but your selects would be shown in a separate Dialog window and not directly as part of your message. You also need some extra functionality to connect the Dialog with your message, e.g. by having a button in the message that opens the Dialog.
Check out this answer on how to combine slash commands, buttons and dialogs.
Another alternative is to chain selects in multiple messages one after the other for the user. This can be done by replacing the original posted message with a new message after each user interactions.
So after the user selected the first drop down your app shows him the 2nd menu and so on. Finally you would show the user a submit or cancel button. You can of course also add some functionality to the workflow, e.g. have a cancel button for every step.
Check out this post on how to replace the current message after the user clicked on a select.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With