web widget displaying help guide and contact form seperately

6 Comments

  • Jessie Schutz
    Zendesk team member

    Hey Andy! I'm looking for someone to help out with this. Sit tight!

    0
  • Guy Dee

    Hi Andy!

    Yes, it is possible to show different components of the Web Widget on different pages by using the Widget API. This isn't as complex as it sounds! The options are documented pretty thoroughly in this article: Advanced customization of your Web Widget

    That link should take you right to the section of the article on suppressing features in the Widget. To accomplish what you describe you'd enable both the contact form and Help Center search in your Widget settings. Then, on the pages where you'd like only a contact form to appear you'll use the method in the article to suppress Help Center search, and vice-versa, on the pages where you want only Help Center search you'd suppress the contact form.

    I hope this helps!

    1
  • Andy Whitlow

    Excellent, thanks Guy.   This works however, if I add two elements for the contactForm, only one of them is active.  Is there a way around this?

    below i have specific to changes to contactForm, but only one is active.

     

    <script type="text/javascript">

    window.zESettings = {
    webWidget: {
    chat: {
    suppress: true
    },
    helpCenter: {
    suppress: true
    },
    contactForm: {
    subject: true
    },

    contactForm: {
          title: {
            'en-US': 'Search for help',
            '*': 'Have your say'
          }
        },


    }
    };

    </script>

    0
  • Guy Dee

    Hi Andy!

    The contactForm items should be nested under a single contactForm entry, rather than split into separate contactForm entries. The example script here demonstrates this on the helpCenter component by modifying both the title and the article button. This same configuration would be used to apply multiple changes to the contact form.

    0
  • Andy Whitlow

    Thanks Guy - that works for some attributes but not others e.g. 'Title' and 'Supress' work when nested but 'Title' and 'searchPlacerholder' do not.  

     

    window.zESettings = {
    webWidget: {
    chat: {
    suppress: true
    },
    contactForm: {
    suppress: true
    },
    helpCenter: {
    title: {
    'en-US': 'Search our guides using keywords',
    '*': 'Search our guides using keywords'
    },
    searchPlaceholder: {
    '*': 'e.g no internet or no sound',
    'en-US': 'e.g no internet or no sound'
    }
    },
    }
    };

    Am I missing some syntax?

     

     

    --EDIT: i fixed it by deleting a comma - the last comma in the script

    0
  • Nicole S.
    Zendesk Community Team

    Glad to hear you got it figured out, Andy!

    0

Please sign in to leave a comment.

Powered by Zendesk