Search code examples
jquerycssbotframeworkadaptive-cards

Change Adaptive Cards in Botframework with jQuery CSS


I am using the MS BotFramework with C# to render an Adaptive Card that looks like this:

Adaptive card image

When the user clicks on one of the stars the number is sent back to the bot. This is working fine. But we also want to update the UI with jQuery and CSS that the user get visual feedback that the selection was successful. We are using the Webchat V3 with DirectLine.

It seems like the Webchat is blocking the jQuery and CSS code. Is there any way to get this working?

I think the Botframework HostConfig allows custom styling by default.


Solution

  • We decided to implement a workaround. After receiving the result of the star Rating the bot is sending the Rating back via the DirectChannel and then a JS function is updating the UI. This was the best solution for us because we didn't change the webchat code itself.