Hide Chat Button

(Chris Kyriacou) #1

Hi,

Is there a way to hide the chat button so that the flowxo chat window can only be activated via link or image I have set up?

I’ve already set up the image which when i click opens the window, just need to know how to hide the button.

1 Like
#2

i asked the same thing here

(Chris Kyriacou) #3

Sorry, I’m not sure how that is the same or answers the question…

(Daniel Beckett) #4

Hi Chris,

With the new Web Messenger features launched today you could use the shortlink generated for your bot.

Is that the kind of thing that you had in mind?

Thanks,
Dan

(Chris Kyriacou) #5

Almost but not quite, although those are amazing options that I will use in the future!

I’m opening the chat window by clicking an image using FxoMessenger.create(). I just want to simply hide the chat bubble as it is not required…

#6

Undocumented feature, but FxoWidget.destroy() is what I’m using to achieve that. You’ll still be about to pop open a new messenger with FxoMessenger.create().

(Chris Kyriacou) #7

Thank you kaiuw,

Could you show me an example of your script please or advise me on where to add the FxoWidget.destroy() command.

Right now I have the bot script as well as another script for the FxoWidget.create() which contains ID’s for the images I want to click, I then assign those ID’s to the images…

I’m assuming FxoWidget.destroy() would go in the initial bot script?

(Karen Barker) #8

Hi Chris,

I’m not sure how Kaiuw has managed to do this - I’ve tried to recreate but it didn’t seem to work for me. :confused:

@kaiuw if you could share what you’ve done here I’d really appreciate it. :slight_smile:

@carlito944 would it not be possible in this instance to have your image as a clickable link and use the new Web Messenger link URL (Option 1 on the Test & Distribute screen) to open the messenger when the user clicks the image? That way you wouldn’t need to use the Web Widget at all.

(Chris Kyriacou) #9

Hmm no, don’t really want to take users off site.

However I could embed the form in a pop up. That’s fine for my site but for clients it would mean sourcing a popup solution and that is too much hassle…

No worries not totally urgent

#10

So I’m actually no longer using this approach, but I was able to hide the widget by calling FxoWidget.destroy() after the library loaded. That is, in the callback or after a synchronous script tag.

Current approach is simply to hide the iframe via a CSS body tag, then to remove that tag when I want to show chat again.

#11

Can you post the example here? I need to controle when show or hide flowxo button. Detroy just hide the window chat, not the button.

Custom CSS for web widget