Skip to content

Instantly share code, notes, and snippets.

@moderatorwes
Created March 2, 2016 20:29
Show Gist options
  • Save moderatorwes/4cb9c2647821f2228d0d to your computer and use it in GitHub Desktop.
Save moderatorwes/4cb9c2647821f2228d0d to your computer and use it in GitHub Desktop.
Zendesk: Hide default system fields on Zendesk Ticket Form
//hide system fields based on ticket forms(change subdomain and form id)
if (window.location.href == "https://yoursubdomain.zendesk.com/hc/en-us/requests/new?ticket_form_id=11111") {
$('.request_subject').hide();
$('.request_description').hide();
$('.form-field label:contains("Attachments")').hide();
$('#upload-dropzone').hide();
}
@cirosirignano
Copy link

Hi,

I've tried to hide the Request Form field from our submit request page.

I edit your code with my form URL and then added your code in our JS code. You can see in the screenshot of my test:

image

It didn't work for me. I think I added the code to the wrong place.
Can you help me, please?

@ehelgueroredk
Copy link

Hi! I was looking into the answer above, and when you do the following, it only works for just one language:

$('.form-field label:contains("Attachments")').hide();

Could be a solution to hide the last form-field element, like this:

$('.form-field').last().hide();

This is going to hide the label and all the inputs inside of it, without adding language specifics to our code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment