Hiding a ticket form on the 'submit a request' page
Answered
Posted Aug 12, 2021
Hi!
I need to know how to hide a form from the 'submit a request' page drop down option, we don't want customers able to select it from the list (we are currently doing a trial by sending them a hyperlink to it through email contact). Customers are not required to sign in to submit a form so we can't use the option of hiding dependant on organisation (saw an article recommending this).
Does anyone know how I can do this please? Newbie coder here so not sure how to go around doing this!
2
100
100 comments
PBJ
My case isn't exactly what's being described here, but I think you all may be able to help me.
I need to hide a ticket form from the New Request page's source. The solutions shared here are excellent at hiding ticket forms from the New Request form dropdown via Javascript, but Javascript loads after the fact - which means all of those hidden forms are still plainly visible via the page source, even if they're not in the dropdown.
My company tests beta software so I need to hide those hidden forms from every possible vector (and a page's source is always just a click away), but I can't find a way to remove form links/IDs from the page source. I've determined this all comes back to the "{{request_form wysiwyg=true}}" helper, but any attempts to remove it or recreate the New Request page without it results in all ticket forms breaking entirely.
Anybody know how I can plug this leaky helper?
0
Ifra Saqlain
Gavin・ギャビン, I understand your concern but I took the reference from here:
https://developer.zendesk.com/api-reference/widget/settings/
and I haven't other idea instead of this so I shared this with you.
Yes, this code is added to script.js file.
0
Gavin
Thanks Ifra Saqlain
Does this go into the script.js file?
What if we want to do the inverse? We have about a dozen forms, and only want to hide one or two of them. Is there a way to say "hide these forms" instead of "show these forms"?
0
Ifra Saqlain
Hi Gavin・ギャビン,
You can do like this, I have 6 forms but I want to show two forms in my web widget so I added the IDs only for two forms:
0
Gavin
Hello.
I successfully used these instructions to remove my form from the form-selection-list.
https://support.zendesk.com/hc/en-us/community/posts/4409217680410/comments/4409692632474
However the form still appears in the Web Widget as a selectable form. How can I remove it from the Web Widget, also?
0
Ifra Saqlain
Hey Alyssa, here is a post for same query you are asking for:
https://support.zendesk.com/hc/en-us/community/posts/5050937568666-Prefill-and-hide-Subject-Description-fields-of-specific-form-on-New-Request-Template
There is JS instead of jQuery, please take a look at it.
If any query feel free to ask :)
Thanks
0
Alyssa
Hi folx!
I had previously used this solution, however, we've opted to use Zenplates which uses vanilla Javascript and not jQuery. Ifra Saqlain do you possibly have a solution for hiding ticket forms using vanilla Javascript? Appreciate any help our resources you can share!
0
Ifra Saqlain
Finally you got it done!
1
Paul Hughes
Ifra Saqlain That's worked, thank you for all your time and patience on this.
Hopefully now for anyone coming along that wants to use the forms on the home page and also in the nesty panel this code will help them.
I don't like the look of the nesty panel alone hence why I use the links to forms on homepage, its much cleaner.
The fact that we can hide a from from Anonymous users and also Organisation Users is fantastic so well done for your work on this, this is going to be a big game changer for how I arrange my forms, and for anyone else looking to use this solution.
Thanks to Pulkit Pandey also for your piece at the end.
0
Ifra Saqlain
Try this:
1
Sign in to leave a comment.