Help Center JavaScript cookbook (Guide Professional and Enterprise)

Have more questions? Submit a request

48 Comments

  • Tomasz Eitner
    Comment actions Permalink

    Hi Trapta,

     

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

     

    Tomasz

    0
  • 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

    0
  • 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">
    {{request_form}}
    </div>

    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:

    https://support.zendesk.com/hc/en-us/articles/203660576-Creating-a-Custom-HTML-Form-for-Ticket-Submission

    Hope that helps!

     

     

    0
  • Jessie Schutz
    Comment actions Permalink

    Hi Kristin!

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

    0
  • 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.

     

    0
  • 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" 

    0
  • Trapta
    Comment actions Permalink

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

    Team Diziana

    0
  • 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.

     

    Thanks-

     

     

    0
  • Ruby Bailey
    Comment actions Permalink

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

    0
  • 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/) )) {
      $('.community').hide();
    }
    0
  • Comment actions Permalink

    Hello,

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

    0
  • Jessen Soobrayen
    Comment actions Permalink

    Hello,

    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?

    Thanks.

    0
  • 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!

    0
  • 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>"; 

    });

    0
  • 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!

    0
  • Saranya Sarika
    Comment actions Permalink

    Hi!

    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?

    Thanks! 

     

    0
  • 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.

    0
  • Ron de Vries
    Comment actions Permalink

    Hello, 

    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!

    Regards, 

    Ron

     

    0

Please sign in to leave a comment.

Powered by Zendesk