microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.58k stars 1.53k forks source link

custom buttons explicitly rendering inside webchat v4 #2403

Closed Bradrajkumar closed 4 years ago

Bradrajkumar commented 4 years ago

Hi all, i need a custom functionality. in webchat V4 i am explicitly rendering some buttons inside bot message content section. It is rendering properly but onclick of that it should send the message as post activity to bot(this thing is not sending the message). i am able to send the message into textbox but after that i used one method as ".click() - which was availabe in webchat v3" is not working in webchat V4. please see the image:- Screenshot (349) here is the code snippet i have wriiten:-

$('.frequent-questions > .ac-pushButton').click(function(){ var a = $(this).text(); // taking text $('.css-16qahhi.css-n2zczk.css-4ix4a1.css-1fe8kfc > input').val(a); // passing value into textbox $('.css-115fwte').click(); autoclick to send the message(not working). $('.css-115fwte').val(""); }); please provide me the code snippet .

tdurnford commented 4 years ago

'How to' questions such as this one are better suited for Stack Overflow. Please feel free to post other questions you have about developing your own features over there so the Bot Framework Support Team and the community at large may help out. If you need help with a Web Chat implementation, you can post a question to the Web Chat tag. Thank you!