To hide the department field on the Zendesk pre-chat form, you can use a specific script. While there's no native setting to completely remove the department field, you can make it invisible to visitors by using the Departments API endpoint with an empty array.
Here's the script you need to add after your widget script on your website:
<script type="text/javascript"> window.zESettings = { webWidget: { chat: { departments: { enabled: [] } } } }; </script>
This code will prevent visitors from seeing the department dropdown, but you can still assign a department to a chat request on the backend using a trigger or the departments.select function. For more details, check out the originalZendesk article.
Yes, you can make the department field optional on the Zendesk pre-chat form. By default, the department field is not removable, but you can make it optional by unchecking the 'Require Department' option in your pre-chat form settings. This means…
If the department field still appears after using the script to hide it, there might be a conflict with other code on your website. It's important to ensure that the script is correctly placed after your widget script. You can test your widget and…
Yes, you can assign a department to a chat request without showing the department field to visitors. Even if the department field is hidden using the script, you can still manage department assignments on the backend. This can be done using a…
When there's only one department option available and it is already selected, the department field becomes hidden automatically. This is because visitors won't be able to interact with it, and the department is set by default. In such…