[英]Any examples of using Adaptive Card as Input Form in Composer?
Are there any examples in Composer using an adaptive card input form (such as https://adaptivecards.io/samples/InputForm.html ) and how to retrieve the information into the design flow? Composer 中是否有使用自适应卡片输入表单(例如https://adaptivecards.io/samples/InputForm.html )的示例以及如何将信息检索到设计流程中?
All the examples I've seen so far as for formatting output data to the user.到目前为止,我看到的所有示例都用于将输出数据格式化给用户。
The sample adaptive card collects name, email, & phone number.示例自适应卡收集姓名、电子邮件和电话号码。 The form displays fine in Composer.
该表单在 Composer 中显示良好。
How do you use this form to collect information in Composer?您如何使用此表单在 Composer 中收集信息? There is no obvious way to use adaptive cards except as an output option.
除了作为输出选项之外,没有明显的方法可以使用自适应卡。
Unfortunately, there isn't a great way to do this at the moment.不幸的是,目前没有很好的方法来做到这一点。 Adaptive Card responses come in via
Activity.Value
instead of the "normal" Activity.Text
.自适应卡片响应通过
Activity.Value
而不是“正常”的Activity.Text
进来。 So, you just need to create a switch in the Unknown Intent trigger that watches for this.因此,您只需要在 Unknown Intent 触发器中创建一个监视此事件的开关。
turn.activity.value && !turn.activity.text
turn.activity.value && !turn.activity.text
- '@{turn.activity.value}'
- '@{turn.activity.value}'
That takes care of the adaptive card part.这负责自适应卡部分。 The trick is getting it to trigger something else if
turn.activity.value && !turn.activity.text
is false.如果
turn.activity.value && !turn.activity.text
为假,则诀窍是让它触发其他东西。 For that, I have it launch a separate dialog on the False
branch (which is a simpler copy of the RespondingWithCards sample):为此,我让它在
False
分支上启动一个单独的对话框(这是 RespondingWithCards 示例的简单副本):
See this GitHub issue for more information.有关更多信息,请参阅 此 GitHub 问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.