Important

Symphony Elements Beta is only available on pods that have been updated to 1.55.3 and running an agent 2.55.9 or above.

Buttons provide a direct call to action. Each button can trigger a reaction, being one of the most important elements.

For a list of all the available elements, refer to Elements.

Attributes

Attribute
Type
Required?
Description

name

String

Yes

Identifies the clicked button.

type

String

No

If type is not specified, the default value will be type=”action”

Indicates whether the button is an action button or a reset button. When clicked, the action button sends the form information to the datafeed. On the other hand, the reset button "cleans" all the fields of the form.

Accepted values: action and reset.

Rules and Limitations

  • By default, action buttons are blue with white outline and text, and should be used for affirmation or confirmation actions.
  • Reset buttons are transparent with blue outline and text, and should be used when the content of the fields need to be deleted.

Examples

The following example shows the use of the Reset and the Submit button when sending a text inserted in a Text Field.

<messageML>
  <form id="form_id">
    <text-field name="text-field" placeholder="Add your comment here" required="true"></text-field>
    <button type="reset">Reset</button>
    <button name="submit_button" type="action">Submit</button>    
  </form>
</messageML>
[
    {
        "id": "UdNe04",
        "messageId": "1B7ezgGTmp4YjZSfJynekX___pQD64rKbQ",
        "timestamp": 1563302327605,
        "type": "SYMPHONYELEMENTSACTION",
        "initiator": {
            "user": {
                "userId": 7078106482890,
                "firstName": "User",
                "lastName": "Bot",
                "displayName": "User",
                "email": "[email protected]",
                "username": "user_bot"
            }
        },
        "payload": {
            "symphonyElementsAction": {
                "actionStream": {
                    "streamId": "0YeiA-neZa1PrdHy1L82jX___pQjntU-dA"
                },
                "formStream": {
                    "streamId": "YuK1c2y2yuie6+UfQnjSPX///pQEn69idA=="
                },
                "formMessageId": "1LLv9v7IZPL+kC+nXDDK/3///pQD7ADedA==5828",
                "formId": "form_id",
                "formValues": {
                    "action": "submit_button",
                    "text-field": "Hello, my name is John!"
                }
            }
        }
    }
]

Updated 6 months ago


Buttons


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.