简体   繁体   English

如何将所选选项的标题发送给机器人?

[英]How to send the title of the selected option to the bot?

I have the following adaptive cards:我有以下自适应卡:

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
        {
            "type": "Input.ChoiceSet",
            "choices": [
                {
                    "title": "Brackets",
                    "value": "1"
                },
                {
                    "title": "Cleaning",
                    "value": "2"
                }
            ],
            "id": "dentalServiceId",
            "placeholder": "Select"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit"
        }
    ]
}

Preview mode:预览模式:

选择集

I use webchat bot framework and when I click "submit", it sends me only the value of the selected option in json format:我使用网络聊天机器人框架,当我点击“提交”时,它只以 json 格式向我发送所选选项的

{ "dentalServiceId": "1" }

I would like to know if it is possible to send the title of the selected option when clicking on the submit button.我想知道是否可以在单击提交按钮时发送所选选项的标题

Is not possible to send the title, one alternative solution adds the title in value field, once received the value, find the title from the value filed.无法发送标题,一种替代解决方案是在值字段中添加标题,一旦收到值,就从值字段中查找标题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM