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
Hi Nicole :), I just saw the theme and all is work fine for both forms:
I figured out one more thing, you don't have this ID (1500003176142) in your any form but you added in the code with the 'if' condition:
It may be:
0
Nicole
Hi Ifra Saqlain! So I am just beginning to work with this actual instance of the HC. At at the bottom of the js, I added the code found on this page. Right above what I added there was existing code that also seems to take the subject off two forms. I didn't write this portion but was equally intrigued. I tried to copy the lines and add in the new form id number but it still didn't hide the subject.
Now oddly enough, the form 1500003055361 was a duplicated form, reworked, and then set in place. What line number did you find that snippet you posted in the js file? I did a double take and can't find it in the js file.
Thank you! :)
Edit**
Oh my goodness, I am so sorry! I just realized what I was doing. I was in the wrong brand HC, lol! If you didn't post about the form number changing, I probably wouldn't have realized it. I put the code in the right HC brand, and now the form has it hidden as we were looking to do. I tested things and everything seems to be working well. Thank you, as always, for your time!!!
0
Bernard Ugalde
Hi Ifra or anyone still awake,
I've been trying to hide the subject and description from a specific form ID 7769763237147, which is for a specific brand, but no matter how many variations of everyone's code I've pasted and published in the script.js, I can never hide and fill them, can anyone help me?
This is the code i have currently all the way at the bottom on my script.js
0
Ifra Saqlain
@Bernard Ugalde, try this type:
0
Bernard Ugalde
Hi Ifra,
Same result, they're still there
0
Ifra Saqlain
@Bernard Ugalde, Remove that and use this:
Team
2
Bernard Ugalde
Hi Ifra Saqlain,
That finally did it. Thank you so much.
1
Ifra Saqlain
:)
0
Eddie Sawyers
Perhaps I've missed something but I'm hoping someone can help - I am successfully able to hide the subject and description fields, but if an end-user forgets to fill in a required field and clicks Submit, the fields show back up again.
Is there any way to validate all the required fields BEFORE the page refreshes? Any code I can put in place to stop the subject and description fields from returning after a failed submit?
0
Ifra Saqlain
Hi Eddie Sawyers, try this,
add field IDs or classes and validate those.
Team
0
Charli Maulson
Hi Sam
I followed your recommendation on the first page of comments this articles to set up a webhook & trigger to updates the subject field with a title & placeholders. (https://support.zendesk.com/hc/en-us/articles/4408882841498/comments/4408894285466)
Everything has been fine until I've got to the last bit on the trigger, where in the JSON body I'm getting a Parse error:
Any tips on how I can rectify this please?
Thank you so much in advance
0
Mark
I have been successful in getting the value input from a previous textfield and populating the Subject field with it:
but I haven't been able to do it when the field is a datepicker type:
It is actually pulling the value just fine, but I think the problem is with the event. Only when I click on the label above the field does it populate the Subject field with "Date is xx-xx-xxxx" but I want the event to fire when a date is picked using the datepicker. I have tried various event types but none of them seem to work.
I can't get a drop-down field to populate my Subject with values at all.
1
Ifra Saqlain
Hey Mark Z,
Try this updated code:
Team
0
Mark
Hi Ifra,
Thanks for your reply. I tried your code and at first it did not do anything and also no errors in the console, but then I think you just forgot the # on this line for the custom field:
I added it, but now it functions the same way as my code previously. I mean, the Subject field does not populate with "Date is xxxx" upon selecting a date from the DatePicker, rather it populates once I click on the label of request_custom_fields_2. I don't really understand the reason for this.
In other words, I click on the textfield request_custom_fields_2 to open the Datepicker... then I select a date... the selected date appears as text in this field ONLY... until I click on the label above it. When I click on the label above the custom field, then Subject populates with the date.
0
Ifra Saqlain
Mark, because you added click event:
Try this: Remove click event.
My updated code with the date:
0
Mark
Hmm, well now it populates the Subject field with the current date and time as soon as the page loads :)
I think it needs to run when the date is chosen in the DatePicker, but I don't know which event I can use for that.
Same problem for a drop-down field.
0
Mark
Any other ideas?
0
Nicole
So if you hide the description field, I know we can auto-populate/fill the field with a static phrase. Is there a way to copy a particular field on the form into the description field instead?
0
Mark
Hi Nicole,
Yes, please see my previous comment. You can use it to fill the subject field from a custom field with this:
You should be able to adapt this for the Description field.
0
Ifra Saqlain
@Mark Z, which plugin are you using for the date-picker?
0
Mark
Ifra Saqlain No plugin, it is simply the default which is used when you select the Date field type in ZenDesk.
0
Mark
In case anybody is looking to get the text from a selected drop-down item:
https://support.zendesk.com/hc/en-us/community/posts/4408860888474-Drop-Down-Menu-Value-vs-Select-Option?page=1#community_comment_5090694302618
0
Ifra Saqlain
@Mark Z, if possible share your HC URL where you are working.
0
Mark
Unfortunately I can't share it as it is being used in production with user authentication enabled. But it is a standard Date field, so you should have the same issue no matter where it is being used. (namely, which event handler can we use for when the user chooses a date in the Date field?)
0
Ifra Saqlain
No problem, I'll look at it by adding date field to my form.
0
Vamshi R
Ifra Saqlain I hope you can help me out on my issue.
0
Ifra Saqlain
Hi Vamshi R,
Add the code to your script.js file but you need to add your form ID and field ID or class name as I mentioned below where to add.
To hide description field:
To hide the Email address field:
You can find your form ID in your search-bar.
Team
0
Vamshi R
Hi Ifra Saqlain
I just used below code and now i am able to hide Description and your email address field.
But i have one more concern, how can i populate a custom ticket field data on your email address field. Below is the screenshot of the field which i need to populate.
0
Mark
It seems to me that ZenDesk disabled many functions of jQuery. For example not all event handlers can function with standard text fields or labels (like mouseenter), and some fields like Date do not allow any events handlers at all (that I have tried).
It would be nice to get some documentation about this from ZenDesk but I have not found any.
0
Ifra Saqlain
@Vamshi R,
Use the given code:
0