Hide the default Smart Widget button


 
Ivan Penchev
Last Updated: 1 year ago

For the times when you want to open the widget using your own button or through some other action, you can initialize it with the default button hidden.

To do so, you will need to use the showButton configuration option and set it to false. Adjust your JS snippet by adding this option after app_id, like this:

app_id: 'abcd1e',
showButton: false

Your final widget installation JS code will look like this:

<!-- HelpCenter.io smart widget code -->
<script type="text/javascript">(function(){
    var s = document.createElement('script');
    s.src = "//helpcenter.io/js/init.js";
    s.async = true;
    window.hcOptions = {
        app_id: 'abcd1e',
        showButton: false
    };
    document.body.appendChild(s);
})();
</script>
<!-- End HelpCenter.io smart widget code -->

where the value of app_id will be specific to your help center.


Was this article helpful?