Hide Subject and Description System Fields



  • Amie Brennan

    Hey Ryan,

    Below here is the code I normally use to achieve this:


      if(ticketForm == 360001824553) {
          $('#request_subject').val('Mandatory Document Submission');
          $('#request_description').val('Mandatory Document Submission');
    Example here:
    Are you able to give this version of the code a try? Mine differs slightly in the lines which HIDE the fields. This code hasn't failed me before so hopefully should do the trick for you as well. 
    Let us know how you go. :)
  • Ryan Crane

    Hey Amie,

    I have given your code variation a go and updated the script.js however after publishing the code and reviewing the form both the subject and description fields are still visible.

    Here is the code for reference, which looks all good.


    Thanks for you help so far :)


  • Simon Boe

    Hey @...

    It should work in regards to the way you show your code using Amies' example.

    Have you tried wrapping your statement in a document.ready function?

    jQuery( document ).ready(function() {
    //add your code inside here.
  • Jonathan Cavey

    Hey @...
    Did you solve this issue? I am running into a similar situation. 

  • Amie Brennan

    Hey everyone, 

    I forgot to add the crucial bit to make this work since the HC theme has been updated within the last 12months around jQuery. 

    We need to add this script to the document head page in the HC theme:

    <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

    Once you add this script, the above code I mentioned will then work for you. :)



  • Bernard AUERT

    Hi everyone,

    I just try Amie's code to hide subjects fields . But the fields are still visible.

    Can anyone help please.

    Thanks Bernard

  • Mohannad (Origins)

    I am facing the same problem. 

    I added the mentioned code in the document head page then added the code in the script.js page and replaced the form ID by the intened form and it did not work with me. Please suggest another solution. I just need to hide the description box only.

    Amie Brennan

  • Noly Maron Unson
    Zendesk Customer Care

    Hi Mohannad,

    I created a ticket on your behalf so that we can discuss this via email. Please respond to my email so that we can continue with the troubleshooting.

    Thank you.


Please sign in to leave a comment.

Powered by Zendesk