【问题标题】:Adaptive Cards - Is it possible to enforce that the user typed something in Input Text Field before Action.Submit is allowed自适应卡片 - 是否可以强制用户在允许 Action.Submit 之前在输入文本字段中输入内容
【发布时间】:2020-07-23 10:30:54
【问题描述】:

我正在尝试在 MS Teams 上使用自适应卡在用户点击提交之前捕获一些用户输入文本。我想要的一件事是我希望用户在允许 Action.Submit 之前输入一些非空字符串。

这是现有的支持功能吗?

谢谢!

【问题讨论】:

    标签: adaptive-cards


    【解决方案1】:

    此功能称为输入验证,是即将发布的 v1.3 版本的一部分,该版本将在未来几个月内在 Teams 中提供。这是一个相同的使用“必需”属性来指示必须输入的内容。

    { "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", “版本”:“1.3”, “身体”: [ { "type": "Input.Text", “id”:“名称”, "placeholder": "第一个,最后一个", "label": "请输入您的姓名", “是必需的”:是的, "errorMessage": "名称为必填项" } ], “行动”:[ { "type": "Action.Submit", “标题”:“保存” } ] }

    你可以在这里了解它。 https://developer.microsoft.com/en-us/office/blogs/adaptive-cards-community-call-july-2020/

    【讨论】:

    • 嘿。似乎这在 Teams 中尚不可用。有消息吗?
    猜你喜欢
    • 2011-01-25
    • 2019-06-29
    • 1970-01-01
    • 1970-01-01
    • 2017-10-30
    • 2021-09-12
    • 1970-01-01
    • 2014-02-28
    • 1970-01-01
    相关资源
    最近更新 更多