有没有办法通过validate委托而不是输入字符串传递已发送的Activity?如果有可能的话会很酷。
FormBuilder<BusinessTrip> builder = new FormBuilder<BusinessTrip>();
return builder.Field(nameof(Order.Date), "When did you order the product?", validate: async (state, input) => {
// Do something.
})
答案 0 :(得分:0)
你不能。如果要将活动中的数据传递到FormFlow
,请使用表单状态来存储它们。您可以在实例化FormFlow
var myform = new FormDialog<MyFormState>(new MyFormState(activity.ChannelId, activity.ChannelData), BuildForm, FormOptions.PromptInStart, null);
context.Call<MyFormState>(myform, FormCompleteCallback);