2
votes

I am using bot framework web chat and I have an adaptive card with just one input field.Is it possible to handle auto complete as user's type in the card's input field ?

Example : Input field is for city.As user type the first 3 character of city i want to provide the suggestions and users can pick from it.

I found the below link in github but its about auto complete for chat typing area not for cards. https://github.com/Microsoft/BotFramework-WebChat/issues/476

2

2 Answers

0
votes

To the best of my knowledge this is not possible today in v1.0 of the Adaptive Card specification. The cards are rendered without any control over their behavior except for the built-in actions: Submit, OpenURL, ShowCard.

Adaptive Cards are very much like HTML 2.0... if you were [un]fortunate to have lived through those days. 😄 The spec defines all the possible behaviors and the agent/host is considered compliant with a version of the spec when they implement those behaviors and no additional behaviors are supported via any kind of extensibility.

0
votes

It may require a little work and some react knowledge, but you should be able to create a custom AdaptiveCard Renderer using WebChat's attachmentMiddleware. In your custom renderer, you should be able to add an input field with your autocomplete logic. For more details on how to create a custom AdaptiveCard Renderer, take a look at this WebChat Example that creates a custom GitHub Card.

Hope this helps!