https://discord.gg/botpress logo
Bubble on some pages, embedded <div> on another --...
# 🤝help
a
Just created my first bot and I want to integrate into my very simple web-site (index + 2 other pages where I want the bubble in the bottom-right corner and contact us page where I want the embedded botpress widget visible). My problem is that once the index page is loaded, unless the user clicks on the bubble, the widget on the contact page is not visible. Is it possible to force it visible wherever user clicked on the bubble on any other page or not? For now I've had to resort to making the bubble visible on the contact page, so at least there's one way to trigger the embedded widget.
Follow-up question -- is it possible to remove the close button from the widget displayed on the contact page?
did some troubleshooting, the window.botpress.on("webchat:ready", () => { never arrives to the window never opens. brute-forced it by setting a timer and trying to force-open the window. If anyone is aware of/using a more elegant/reliable way, please reply.
p
Could you share your current code? Do you want the three pages to have your bot embedded? Which button are you reffering to?
a
Thanks for your reply Leanne. This is a regular page template: https://pastecode.io/s/jbyp88xy this is a contact page template: https://pastecode.io/s/b9edyg9u. In a regular page I want the bubble and it works well. In the contact page the
webchat:ready
never arrives, so the embedded widget doesn't show unless user clicked on the bubble at another page. Hence I set the timer to force-open. Please find the screenshot where I've circled the close button I want to disable on the contact page. https://cdn.discordapp.com/attachments/1395987218937413762/1396886693532930098/image.png?ex=687fb79c&is=687e661c&hm=0befe8429e4d7240f7b3030b9ffaf3d1e9e4f3b6c4e5d6b8575306b1ace1cafa&
p
To hide the close button use this code in your bot's style section:
Copy code
css
.bpHeaderContentActionsIcons[aria-label="Close Chatbot Button"] {
  display: none !important;
}
a
you mean in the studio or in the template?
in other words -- in the studio or in the HTML?
p
I tried it in the dashboard webchat section.
a
ah, I only want to do it selectively, only on contacts page
I've tried it in the HTML page header and it didn't work
I've noticed when the bot is invoked thru dashboard it does not have the button, so it's obviously possible, but I'm yet to control that magic. 😦
teach me master!
I've added it to the style in the header and I've tried to dynamically update it after window.chatpress.open, and I can still see the close button: https://pastecode.io/s/w13962y3
Hey @prehistoric-airplane-85682 any other suggestions for me? I want to integrate into my very simple web-site (index + 2 other pages where I want the bubble in the bottom-right corner and contact us page where I want the embedded botpress widget visible). My problem is that once the index page is loaded, unless the user clicks on the bubble, the widget on the contact page is not visible. Is it possible to force it visible wherever user clicked on the bubble on any other page or not? When opening the contact page, the window.botpress.on("webchat:ready", () => { never arrives to the window never opens. brute-forced it by setting a timer and trying to force-open the window. Also, is it possible to hide the chatbot close button on Contact page/template only? The most recent Contact template is here: https://pastecode.io/s/w13962y3
4 Views