Question
How can I hide or remove the subject and description fields on the submit a request form in the help center?
Answer
You can hide the Subject from your request form. However, the Description field cannot be hidden by default.
To hide the subject field from the request form
- Go to Admin Center > Objects and rules > Tickets > Fields.
- Open the Subject field.
- Under Permissions, select Customers can view.
- Select Save.
Customers won't see the subject field in the request form, but the field is visible in the customer portal.
When you use the Customers can view permission, the description of the ticket becomes the subject of the ticket.
235 comments
Ifra Saqlain
@David Jetter,
Currently in your code, remove it:
Replace that line of code with given below:
0
David Jetter
Ifra Saqlain That did the trick, thank you so much for helping with this!
0
Brett Bowser
0
Ifra Saqlain
My pleasure Brett Sir! and I'm glad that it's working for David :)
0
Nicole
Ifra Saqlain Shifting thought, do you know how to add fields to the subject without the subject being hidden? Looking to have the end user add the subject themselves, and then after clicking submit adding two dropdown custom fields to the subject line. I currently have:
But this doesn't work. Link to page is here. The two custom fields in question are dropdowns. Thanks in advance for any help you can offer!
0
Ifra Saqlain
@Teresa, try this code, add it to your script file --
i). When you have done with the code.
ii) Go to that form page > select value in the both dropdowns.
iii) Go to the subject field and type your title.
iv) Double-click on the subject field after writing the title.
v) Both dropdown field values will be added in the subject field.
Hope it helps you.
If any queries feel free to ask :)
0
Walaa Britel
Do you have please any insights on the email address field? How can I move it, for instance, placing it in the third position, or how can I hide it from the form?

0
Gabriel Manlapig
Email address, or "Your email address," is the part where the requester of the ticket is identified, and it is a mandatory field when submitting a request via Zendesk Guide. I'm afraid this field is hardcoded on our backend and can't be moved or hidden from the ticket form.
I hope that answers your question. Thank you!
1
Geoff Ludwig
New to Zendesk - so please be nice :)
I am in the process of setting up forms for different option and came across this and wanted to see if someone could help.
I am just looking for a basic example of how to hide the Description and Subject fields for certain forms i create. I know how to get the form ID already - just need help with a template.
Thanks!
0
Brandon (729)
Hey Geoff Ludwig,
Welcome to the cool kids club! To achieve your result, you can follow the instructions here but with a few lines of supplemental code. In this case, we are going to wrap the code that hides the fields inside an if statement that looks for the form id(s).
To hide the subject and description fields using Javascript or jQuery
The created tickets will have the subject and description fields auto-populated but only for those specific forms. You might also find the JavaScript Cookbook helpful.
Let me know if you have any additional questions, and if you need more personalized assistance, feel free to drop me a line and schedule a free consultation with our team.
Brandon
1
Mark
One thing I would add, Brandon (729), is that this method does not work so reliably. Due to a bug in ZenDesk, if you submit a ticket form with errors (mandatory field not filled out, etc.), the page will refresh with the current form open, but the URL will change - it will no longer display the form ID in the URL, and your JS code will be useless.
The only workaround I have found so far is to detect for a particular field on the page, rather than using "ticket_form_id=", and if that field exists, then run whatever conditions you want. Of course, you would need to make this "special field" and only use it on the form you need it on, and then perhaps hide it with JS, but otherwise you will have unreliable JS. Try it out yourself if you don't believe me :)
1
Brandon (729)
Hey Mark,
That's a good call out. We've had some luck using Mutation Observer to scan for changes in those hidden fields, but that does require a far deeper configuration of the JavaScript.
Brandon
1
Geoff Ludwig
Thanks Brandon and Mark!
I will be trying this now - stay tuned!!
0
Geoff Ludwig
I think i am missing something - hopefully you guys can help. I hit publish on both screens and the subject is still showing. HELP! :)
I added the code to document_head.hbs per this article you referenced.
And i added the code you supplied to the script.js at the bottom (not sure if that matters).
0
Brandon (729)
Very Close!
In your second part - the first two lines should read
The first line grabs the current form ID from the URL; the second checks your target form against that variable.
0
Geoff Ludwig
Thanks for the quick response... I changed and i am still seeing the same issue.
0
Geoff Ludwig
Brandon (729) - did I do something on the code above?
0
Brandon (729)
Hey Geoff Ludwig -
From where I'm sitting that looks good - but there's quite a few reasons that might break. Someone else from the community might be seeing something I'm not though. Alternatively, if you'd like to hop on a quick call you can grab time with me here next week.
Cheers,
Brandon
0
Geoff Ludwig
Brandon - the grab time with me here hyperlink is not working.
Can you provide something else?
0
Brandon (729)
Hey Geoff - Sorry about that - you can reach me at https//lp.729solutions.com/free-zendesk-checkup - you may have to copy/paste into your browser. Looking forward to it!
0
Brandon (729)
Hey Geoff,
Closing the loop here - we were able to confirm your JS implementation and obscure the subject line from the end-user form by going to Admin Center > Ticket Fields > Subject and setting to "Agent Only." Glad to see that we were able to get things sorted for you!
Brandon
1
Geoff Ludwig
Thank you sir! Excellent assistance!
0
Shahid Iqbal
I have tried to change the "Your email address" label but didn't work, can any one guide how can I do this?
0
Ifra Saqlain
Hi Shahid Iqbal,
Add the given line to your script.js file at the bottom area.
I have tested it and it's working. If any issue let me know I'll change the class (request_anonymous_requester_email).
Thanks
1
Shahid Iqbal
Yes, that worked for me. Thank you so much
0
Andy Pitts
Hi
With the help of this article and comments I've been able to get the Subject and Description fields to autofill based on the ticket form being used. On the first attempt this works as expected but if I then select a different form from the dropdown the Description field reverts to being blank. The Subject field works perfectly every time. If I wait about 15 seconds before selecting a different form, the Description field does autofill but if I change the selected form any quicker than that it is always blank.
For troubleshooting, I have used
console.log($('#request_description').val())
to check what value the field has and even when the Description box is visibly empty "val()
" is showing the correct value (albeit without the surrounding<p></p>
tags). However, it is not enough to allow the form to be submitted because it returns with the error that the Description field needs to be completed.It feels like a problem related to the rich text editor of the Description field.
Any advice on how I can get this to work consistently like the Subject field?
Thanks in advance
0
James Skene
Hi
I have hidden the Description field from the end user and auto-populate this with information the agents need to provide before escalating to another function within the business. This works well apart from one drawback, the Description field is visible to the End User when they are viewing their tickets in the Requests page.
Is it possible to hide this description from the end user completely?
Open to suggestions on how to get round this. I've also tried populating it with values from custom fields but that didn't work, the Description field wouldn't populate.
Thanks
James
0
Sam
Hi James Skene !
Since end users are the ones submitting tickets, the description would go in as a public comment. One thing to explore might be to have a generic “We've received your ticket” (or something similar) message post as the description, then once the ticket is received, have a trigger with a webhook that posts an internal note to the ticket with all the details the agent needs.
Hope this helps!
Sam
0
James Skene
Thanks Sam!
Hmmm that could be a good fallback thank you. Are you aware of any way to populate the Description field with custom field values, similar to how we to do it for the subject? I have the tried the same code, replacing "#request_subject" with "#request_description" but to no avail
Thanks
James
0
Sam
James Skene Are you trying to populate the data from a custom field using JavaScript on the submission form itself? Do you have a copy or screenshot of the section of code you are attempting to use (but isn’t working)?
0