I have a slack modal with a static_select
{
block_id: "my_block_id",
type: "section",
text: {
type: "mrkdwn",
text: "Please select one"
},
accessory: {
type: "static_select",
action_id: "select_type",
placeholder: {
type: "plain_text",
text: "Select one"
},
options: self.types_options
}
},
When the user selects one of the option a backend call is been triggered, can I avoid that and have the call triggered on submit form button click?
Put your static_select inside an input rather than a section.
When someone uses an interactive component in your app's modal views, the app will receive a block_actions payload.
This does not apply to components included in an input block (see below for details about those).
https://api.slack.com/surfaces/modals/using#components
Any interactive components used within input blocks will not send this block_actions payload. They are included in view_submission payloads only.
https://api.slack.com/reference/interaction-payloads/block-actions
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