Hide ticket fields in web widget



  • Devan - Community Manager
    Zendesk Community Manager

    Hello @...,

    The link you shared lead to an old EAP that is no longer live, sorry for the confusion. I've gone ahead and updated that post, so it shouldn't cause any more trouble. As for your question, I'll see if our Moderator team can offer a solution. Otherwise, I'll be sure to share this in our Weekly Digest so other members of the community can share their expertise. 

    Best regards. 

  • Amy Ogborn

    Thanks @... - I look forward to see if anyone can help me out here :) 

  • Alejandro Colon


    Try this code and see if it helps.


  • Amy Ogborn

    @... - Thanks. Unfortunately I can't get it to work.

    I am putting in the script.js file  and changed the below line to reflect the classes in my helpdesk

    #Embed > div > div > div > form > div > div.sc-cpmKsF.fvnioU > div:nth-child(1) { 

    But it isn't hiding the fields. I don't think it's finding the fields to start with.

    Any guidance? Thanks in advance

  • Alejandro Colon


    Make sure you are putting the code after the initialization of the widget. 

    Note: This code is only run when the widget is opened. 


    By default, I commented out all of the individual lines to make sure that the code does not have unintended effects.

    Make sure you uncommented the section you are trying to use. 


    The code should be added to the same place you are adding the initialization of the widget. You should not be inputting the file anywhere. 


    I updated the documentation at the link to help explain this.

  • Amy Ogborn


    Yes, I missed that I had to put it after the widget. Thanks!

    The bit that was breaking it for me is that in your code you have forgotten to close the function. Just in case any one else needs this code :)

    Thank you so much on helping me fix days of torment! Much appreciated.


  • Alejandro Colon


    I will update that right away. 

    Glad the code helped you. 


    I was tired of seeing the same requests for the past 5 years and Zendesk not doing anything about it.

  • Alejandro Colon

    Active Feature Request (please vote):

    Feature Request: Hide ticket fields in web widget


    I just posted a Feature Request for this at the link below. If you would like to see this feature please head over there and show your support. Please make sure to add an upvote and comment even if it is simply a "+1"

    Also, you may consider adding it to your post to get the feature request more visible.


  • Preventium Health - Websays

    We solved this using this Javascript, where "xszt60-1.dLJShQ" is different for each widget.

    <script type="text/javascript">
    zE('webWidget:on', 'open', function () {
    var style = document.createElement('style');
    style.innerHTML = `.xszt60-1.dLJShQ > div:nth-child(1) {display: none;}`;
    style.innerHTML += `.xszt60-1.dLJShQ > div:nth-child(2) {display: none;}`;
    style.innerHTML += `.xszt60-1.dLJShQ > div:nth-child(3) {display: none;}`;

    But I have a question: can this ID change at some point? Is this always like this for each Zendesk instance?

  • Krunal Parmar

    It gives me this error, with this script.

  • yanai


    Alejandro says:

    The reason you were unable to find that repository as it was deprecated for a new one. https://github.com/Ajhad1/Zendesk-Customizations

    Look under web-widget folder for the code you are looking for. 


Please sign in to leave a comment.

Powered by Zendesk