image for site

Editing JavaScript for Zendesk Ticket Forms

Tips for editing JavaScript to hide ticket forms in Zendesk, including compatibility considerations.

What should I consider when editing JavaScript to hide ticket forms in Zendesk?

When editing JavaScript to hide ticket forms in Zendesk, ensure you copy all characters correctly, such as semicolons and braces, to avoid errors. The code uses the DOMNodeInserted Mutation Event, which is not supported in newer Chrome versions, so consider using Mutation Observer for compatibility.

Edit the script.js file in your theme, replacing placeholders with your specific form ID and organization name. This customization won't work for unauthenticated users or those without an organization, as all forms will display for them.


More related questions

How can I hide ticket forms based on a user's organization in Zendesk?

To hide ticket forms based on a user's organization in Zendesk, you need to use JavaScript to customize your help center's code. First, find the ticket form ID and the organization name. Then, edit the JavaScript in your theme's script.js file to…

What are the steps to find a ticket form ID in Zendesk?

To find a ticket form ID in Zendesk, navigate to the Admin Center and go to the Ticket Forms page. Select the ticket form you want to work with, and look at the URL in your browser. The ID number will be located after the last slash in the URL….

How do I find an organization name in Zendesk?

To find an organization name in Zendesk, go to the Admin Center and navigate to the People section. From there, you can browse or search for the organization you need. Once you find it, note down the exact name as it will be used in your JavaScript…

Can I hide ticket forms for unauthenticated users in Zendesk?

No, the method for hiding ticket forms based on a user's organization in Zendesk does not work for unauthenticated users. For these users, all ticket forms will be displayed regardless of the organization settings. This limitation means that the…

Interested indeflectingover 70% of your Zendesk support tickets?

Our AI customer support agent is here to help. Trained on all your help docs, installed directly into your Zendesk account, it can be used to automate customer replies for tickets or live chat. Learn more below.
Zendesk logo

Zendesk Support Tickets

Receive new tickets by email or a support form? This integration is for you.
My AskAI integrated within Zendesk to deflect support tickets
Learn about our Zendesk ticket integration
Zendesk logo

Zendesk Messaging (live chat)

Using Zendesk's Messaging widget on your site for live chat? This integration is for you.
My AskAI integrated within Zendesk to deflect customer support live chat conversations
Learn about our Zendesk Messaging integration

Join1,000+ companies reducing their support costs and freeing up support agents for more important work

Vestd company logo — Customer of My AskAI's AI customer support agents
Genesis company logo — Customer of My AskAI's AI customer support agents
Zinc company logo — Customer of My AskAI's AI customer support agents
Customer.io company logo — Customer of My AskAI's AI customer support agents
Zeffy company logo — Customer of My AskAI's AI customer support agents
NHS company logo — Customer of My AskAI's AI customer support agents
Kontakt.io company logo — Customer of My AskAI's AI customer support agents

Reduce support costs.Spend more time on customer success.

Our AI customer support agents are already used by 👇
Companies using AI assistants on their websites