Slack Blocks - Email input with dispatch action is not dispatching

70 views Asked by At

I want to show a Slack input with blocks and have an email input that fires the action when someone enters an email and presses enter.

This renders correctly, but the action firing is not working (nor do I see press 'enter' to submit like I do for a plain text box)

For some reason, if I change the element.type from email_text_input to plain_text_input it works.

How do I make Slack show an email input that will fire an action when "enter" is pressed?

{
    "blocks": [
        {
            "type": "divider"
        },
        {
            "type": "input",
            "label": {
                "type": "plain_text",
                "text": "Enter email",
                "emoji": false
            },
            "element": {
                "type": "plain_text_input",
                "action_id": "confirm-block",
                "placeholder": {
                    "type": "plain_text",
                    "text": "[email protected]",
                    "emoji": false
                },
                "focus_on_load": true
            },
            "dispatch_action": true,
            "optional": false
        },
        {
            "type": "input",
            "label": {
                "type": "plain_text",
                "text": "Enter email",
                "emoji": false
            },
            "element": {
                "type": "email_text_input",
                "action_id": "confirm-block",
                "placeholder": {
                    "type": "plain_text",
                    "text": "[email protected]",
                    "emoji": false
                },
                "focus_on_load": false
            },
            "dispatch_action": true,
            "optional": false
        }
    ]
}

Here's the rendering in the block kit builder:

Rendering of above code

0

There are 0 answers