Recent searches
No recent searches
Hiding a ticket form from anonymous users
Answered
Posted Jan 09, 2023
Is there a way to restrict a specific ticket form from being visible to anonymous users i.e. Help Center visitors who are not signed in? We have different personas accessing our public Help Center and ideally, this specific form is not available from the drop-down field on the new request page unless they're signed in.
I've seen the other Community posts where you can restrict form viewing permissions based on the organization name or user tags, and how you can restrict the "submit a request" button entirely, but unfortunately, none of these existing posts solve this specific use case.
1
9
9 comments
Pulkit Pandey
Hi Grace Mun
Please, add the below code at the bottom of your script.js file
Let me know if it solves your issue
Thank You
Pulkit
Team Diziana
0
Grace Mun
Hey Pulkit Pandey, would this code block anonymous users from submitting a request in general?
We still want anonymous users to be able to submit a request, there's just a specific form we want to hide from them.
I've set up the code below and it seems to work actually:
1
Mark Rickard
We want to hide 9 of 10 forms from anonymous users. What is the syntax to list multiple form IDs in this code?
Thanks in advance! This is a beautiful thing.
0
Zsa Trias
Hello Mark,
The custom code seems to be provided by one of our community members.
I have implemented the same code on my test account, adding multiple form IDs thru this line:
However, please do note, we're unable to guarantee that it will continue to function as the product changes.
0
Mark Rickard
Thank you for the assist. I will use it gladly for as long as I can.
0
Mark Rickard
Would the jquery referenced above go in the script.js file or on the new request page? I added the script to the script.js file, adjusted for multiple forms to block from anonymous sight, and published it, and I don't see that it's working.
0
Mark Rickard
Never mind! I forgot to add the jquery script to the document_head file.
https://support.zendesk.com/hc/en-us/articles/4408829274906-Importing-or-upgrading-jQuery
0
Zsa Trias
Awesome! Glad you're able to figure this out, Mark!
0
Mark Rickard
This has stopped working for me and I can't tell if changes to Zendesk have broken it. I'm using the Diziana Makem theme, Theme version 3.1.2, Templating API v1. I've added jQuery 3.6.1 to the script.js file, made sure the form IDs below are correct, and added the following code to my document_head file:
0