Open web widget on contact form | Community
Skip to main content

Open web widget on contact form

  • August 5, 2020
  • 2 replies
  • 0 views

Hello, i'm using two web widgets, one for chat and the other one for contact, i've put this code to the settings

"contactOptions": {
"enabled": true
},

and the widget shows me two options (chat and contact), i want to know if theres a script to open the widget directly on the contact form, to open the live chat i'm using this script $zopim.livechat.window.show();, zE.activate() opens the widget but on the "homepage" to select chat or contact.

2 replies

Katie24
  • August 17, 2020

Hi @Enrique,

Thanks for reaching out!

I would suggest viewing our article: Advanced customization of the Web Widget.

My understanding is that you want to have both the live chat and contact form options enabled in the web widget, but on certain pages, you only want the contact form option available for your customers. 

Lastly, I noticed that @Dawn Anderson mentioned that they already "have got the script needed to open the 'chat form' and to 'open web widget'". If the above resources do not help solve your issue, I am mentioning Dawn here to see if that script is available to share from the Getting the web widget to open at the 'contact channels' page post. 


  • October 21, 2020

A Google search brought me here. Same problem as OP, and the provided answer from Zendesk support didn't directly solve the problem.

You can potentially suppress certain functionality on a per-page basis, but that would then prevent your users from using the opposing option. This is also problematic with SPAs.

  // Suppress the help centre, so that when the widget is opened, it goes straight to "Contact Us"
zE('webWidget', 'updateSettings', {
webWidget: {
helpCenter: {
suppress: true,
},
},
});

// Open the widget for the user immediately
window.zE('webWidget', 'open');

// Event trigger that fires when the user closes the Contact Us form: Make it so that the the help centre is available again
zE('webWidget:on', 'close', () => {
zE('webWidget', 'updateSettings', {
webWidget: {
helpCenter: {
suppress: false,
},
},
});
});