Mattermost Peer-to-Peer Forum

Select element default value not displayed


I have a problem that I don’t know how to solve.

When I’m using the api to create a dialog, all the select default values are not displayed:

'dialog': {
    'callback_id': 'callback',
    'title': 'title',
    'icon_url': '',
    'elements': [
            'display_name': 'Task',
            'name': 'task',
            'default': 'opt1',
            'type': 'select',
            'options': [{'text': 'Option 1', 'value': 'opt1'}, {'text': 'Option 2', 'value': 'opt2'}],
            'optional': False
    'submit_label': 'Submit Test',
    'notify_on_cancel': True,
    'state': 'state'

But on submit, the value default value is correctly in the payload as intended.

Do you have any idea ?


@Hanzei / @jasonblais ^


@gloupmer Do you have a trigger_id and url part of the form submission?


yes, everything works perfectly, the dialog is correctly displayed but not the default values on select elements


@Hanzei Wondering if you’d have time to help test if it reproduces for you? I wonder if the defaults are working for the select element.


@gloupmer Would you please try to create a dialog with no default? What server version are you running?


@Hanzei It is working with no default.
I’m running the version 5.10.0-rc2

I think it is only a ui bug. On submit the default value is correctly in the payload