Help Center JavaScript cookbook (Guide Professional and Enterprise)

Have more questions? Submit a request


  • Tomasz Eitner
    Comment actions Permalink

    Hi Trapta,


    You are a star ! thanks ! all working perfect now!



  • Chuck Yocum
    Comment actions Permalink

    I am trying to show a blurb in the Category Page if a user is not part of the User Segment.


    Basically, all articles in that section are tied to that User Segment.   So what ends up happening is that section isn't in the Sections collection.    If that is the case I want to show a text blurb stating that.

    These documents access are only given by special request.   Please submit a ticket to view these documents.


    I can't seem to get this to work.  I am almost positive I need to use javascript but can't seem to get at the correct object.    Any help would be appreciated

  • Jonny
    Comment actions Permalink

    Hey Laura,

    Thanks for your questions :) 

    If you'd like to want to customize the request form - you will want to grab this (see code below) from your "new request page" section:

    <div class="form">

    From there, you can certainly build it out all from scratch in the place of the {{request_form}} placeholder - that way you can really customize what's there if you'd like. You can do that or use JavaScript in the Help Center to change what the placeholder renders. I can understand if none of these options are ideal, but building out your custom form is really the best option

    More information on that can be found in the link below:

    Hope that helps!



  • Jessie Schutz
    Comment actions Permalink

    Hi Kristin!

    I'm checking with some of our Community Moderators to see if they can help!

  • Faccioli
    Comment actions Permalink

    Hi Madison,

    Thank you! 

    I understand that is possible upload more than one file at the same field. However , I need to know if is possible "double" the attachment field . That is, one field for each file.


  • Laura Berkobin
    Comment actions Permalink

    This is great - thank you. Love the cookbook concept!

    I have a few questions...

    1. How can I customize the header (or not have one) for a specific ticket form? 

    2. How can I change the labels on a specific ticket form? For example, "Attachments" on one ticket form would be, "Please attach a copy of your receipt" but on another ticket form, "Please attach a screenshot of the error" 

  • Trapta
    Comment actions Permalink

    @Tomasz Glad to hear that you got it working. Enjoy :)

    Team Diziana

  • Anil Kumar (Community Member)
    Comment actions Permalink

    Hello all,

    I wanted to show a modal(pop-up) on change of a dropdown field. So is there any method in zendesk to do this.

    As far I know that ZD is not using "Selectbox" for this so I'm unable to use jQuery's onChange function.

    So I think ZD may have any function for this.





  • Ruby Bailey
    Comment actions Permalink

    Is it possible to copy the value of a custom field to the description field (system)? 

  • David
    Comment actions Permalink

    Regarding hiding the Community based on language - can someone point out exactly what needs to be replaced to adapt it to my relevant language?

    Lets say I dont want it to appear in English, is this correct:

    if (document.location.pathname.match( (/hc\/en-us/) )) {
  • Comment actions Permalink


    Is possible add more than one field for attachments and uploads ?

  • Jessen Soobrayen
    Comment actions Permalink


    I am trying to customise the values (hide some values) of a drop down in the "$(document).ready(function () {".

    Does someone know how to do this?


  • Brett - Community Manager
    Comment actions Permalink

    Hey Jonathan,

    If you're trying to customize the widget, I recommend taking a look at our Advanced Customization of the Web Widget article which has a ton of useful information for you.

    If that doesn't help, can you provide a screenshot of the exact label you're trying to alter?

    Let me know!

  • Chuck Yocum
    Comment actions Permalink

    I figured this out.

    What i did was set the ID to the nameof the section in the category.hbs when the sections are being created.

    in Javascript I check to see if that object exists using

    $(document).ready(function() { 
    var section = document.getElementById("White Papers"); 
    if (section == null) 

    var label = document.getElementById("emptyLabel"); 
    label.innerHTML = "<b><font size=3>Your Text Here</font></b>"; 


  • Kim Graf
    Comment actions Permalink

    I'd like to change the "Submit a request" text to something else, probably "I need help" on all my HC pages. I found the article on how to do it on one page with pointers to jquery etc. But since I'm not a hard-core coder (just learning), I need a tad more guidance. 

    I was able to change the "Popular articles" text w/ JS thanks to another post. 

    I'd love any guidance. Thanks!

  • Saranya Sarika
    Comment actions Permalink


    I would like to hide some options from a custom drop down field from end users. I tried to edit the code but I could not find the $(document).ready(function() since we are using a custom theme. 

    May I know where else I can edit it instead?



  • Jonathan Chalker
    Comment actions Permalink

    None of the methods in the article appear to work with the recent versions of the widget. I'm struggling to find a viable way to change the labels on the form fields in the widget and nothing seems to work.

  • Ron de Vries
    Comment actions Permalink


    Does someone here know how to fix this error: 



    It should show this table: 

    The Console (Dev.Tools) sais: 

    Uncaught TypeError: moment is not a function
    at Object.a.needToFlushDB (9aa289914132a72f08dd121984de0de3c8ab4457.js:15)
    at r (9aa289914132a72f08dd121984de0de3c8ab4457.js:15)
    at new a.initialize (9aa289914132a72f08dd121984de0de3c8ab4457.js:15)
    at initMultiLevelMenu (9aa289914132a72f08dd121984de0de3c8ab4457.js:15)
    at HTMLDocument.<anonymous> (script.js?digest=360029839118:166)
    at c (jquery-c679166c1baf738bb62b9918a7a13fd4.js:1)
    at Object.fireWith [as resolveWith] (jquery-c679166c1baf738bb62b9918a7a13fd4.js:1)
    at Function.ready (jquery-c679166c1baf738bb62b9918a7a13fd4.js:1)
    at HTMLDocument.r (jquery-c679166c1baf738bb62b9918a7a13fd4.js:1)

    Does anyone have a suggestion or tip? 

    Thanks in advance!





Please sign in to leave a comment.

Powered by Zendesk