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 François Bellavance. :)
You can disable CCs part using the settings:
https://support.zendesk.com/hc/en-us/articles/4408843795482-Configuring-CC-and-follower-permissions#topic_x3t_4p5_cq
OR
Share the public URL of your HC then I can share script code to hide via code.
Thanks
0
François Bellavance
I don't know what's the public URL of our HC because we have setted it to only connected users, it's not public at all. Yet we have another brand wich is public.
Transport Scolaire (zendesk.com)
I'm also hiding some parts of the public brand.
0
Ifra Saqlain
François Bellavance,
You are hiding CC field for this form:-
I opened this form:
there doesn't exist this field.
0
Paul Hughes
Hi Ifra Saqlain
Im following all the code provided here and all is working great code below, I have two functions one for hiding the subject and one to hide the description and it works when i select from one of the choices in my dropdown. I have two choices
Dropdown One is Submit a request
Dropdown Two is Student Assistant Fund Request
Issue im facing is, when i select Student Assistant Fund Request it will hide the subject and description like i want, but when i click back on Submit a request the boxes stay hidden and I would like them to be shown again, is this possible? It seems to only way for these boxes to reappear is by refreshing the page.
Code:
// Hide the Subject and Description boxes when these fields are selected.
$(document).on('change', '#request_custom_fields_4940267078044', function() {
hideDescription();
});
function hideDescription() {
var selected = $('#request_custom_fields_4940267078044').val();
if (selected != "4940267078044") {
$('.form-field.request_description').hide();
tinymce.get("request_description").setContent("<p>Student Assistance Fund - Full Time Application 2021/2022</p>");
}
else {
$('.form-field.request_description').show();
tinymce.get("request_description").setContent("");
}
}
$(document).on('change', '#request_custom_fields_4940267078044', function() {
hideSubject();
});
function hideSubject() {
var selected = $('#request_custom_fields_4940267078044').val();
if (selected = "4940267078044") {
$('.form-field.request_subject').hide();
$('#request_subject').val('Student Assistance Fund - Full Time Application 2021/2022'); // Autofill subject
}
}
0
Ifra Saqlain
Hi Paul H :)
Can you share your URL here?
1
Paul Hughes
Hey Ifra Saqlain
Thanks for coming back so fast,
Here's the link to my form: My Form
0
Ifra Saqlain
Hi Paul H :), I know It's too much late to answer.
So, do the following:-
Remove your previously added script code and add the given below.
If any confusion feel free to ask :)
Thanks
1
Paul Hughes
Hi Ifra Saqlain,
No never too late to answer, your code worked perfectly, you are a life saver.
Thank you so much,
Paul
0
Ifra Saqlain
😊️
0
Kevin Sanchez
Hello! Hoping to get some assistance here.
We have a use case where we hide the subject & description fields on certain forms.
But we've encountered an issue where we're using custom URL's to pre-populate some fields, but when those URL's are used it seems that the Javascript doesn't execute and the Subject & Description fields are then shown. Is there a solution to this?
Or some way to ensure the javascript executes no matter how the request page is loaded?
0
Ifra Saqlain
Hello Kevin Sanchez,
Can you share the URL of your HC?
Thanks
0
Brett Bowser
Can you confirm that you've made the fields both visible and editable to end-users in the agent interface? If that's not the issue, can you share the code you're using that's not functioning properly?
Thanks in advance!
0
Paul Hughes
Hi Ifra Saqlain
Wondering if you might be able to help me here as you did before.
I had all my code working and it was perfectly hiding the subject and description and auto filling both, worked great. But I'm after changing themes and for some annoying reason now the Description is not auto filling, it still disappears but doesn't auto fill, if you have any ideas of what might be causing this id be so grateful as I've tried everything.
Here's a link to my page.
Code below:
$(document).on('change', '#request_custom_fields_5290902356252', function() {
hideSubject();
hideDescription();
});
function hideDescription() {
var selected = $('#request_custom_fields_5290902356252').val();
if (selected == "msc_research_project_internship") {
$('.form-field.request_description').hide();
var descText = 'MSc Research Project / Internship Public Cloud Requirements Form has been submitted to the NCI Support Hub';
$('#request_description').val(descText);
}
else if (selected == "new_starter_form") {
$('.form-field.request_description').hide();
var descText = 'New Starter Form has been submitted to the NCI Support Hub';
$('#request_description').val(descText);
}
else {
$('.form-field.request_description').show();
$('#request_description').val('');
}
}
function hideSubject() {
var selected = $('#request_custom_fields_5290902356252').val();
if (selected == "msc_research_project_internship") {
$('.form-field.request_subject').hide();
var descText = 'MSc Research Project / Internship Public Cloud Requirements Form';
$('#request_subject').val(descText);
}
else if (selected == "new_starter_form") {
$('.form-field.request_subject').hide();
var descText = 'New Starter Form';
$('#request_subject').val(descText);
}
else {
$('.form-field.request_subject').show();
$('#request_subject').val('');
}
}
0
Ifra Saqlain
Hey Paul, get back to you soon ,with the solution :)
1
Paul Hughes
Hi Ifra Saqlain,
Thank you,
0
Ifra Saqlain
Hi Paul H, I can't access your new request page cause of authentication.
Can you check your console in dev tool?,
i). Go to your new_request page. Right click of your mouse.
ii). Open Inspect in the opened list.
iii). And the, click Console in the dev tool.
iv). Is there any error ?
0
Paul Hughes
Hi Ifra Saqlain,
Thanks for coming back, that's strange that your getting an authentication error as this page should be open to the public, NCI Support Hub
I got the error below after I checked the console.
0
Paul Hughes
Hi Ifra Saqlain,
I got an update from you but the link to the comment is broken and the images are all missing, its like the comment doesn't exist?
0
Ifra Saqlain
Hi Paul H, try this;
Remove wysiwyg=true (If you don't want the toolbar at the top of description field) from the form helper and then let me know.
Current:
After:-
Text is adding in the textarea not in hc-wysiwyg.
OR
You can remove the code (If this is useless) and then test above code is working or not.
1
Paul Hughes
0
Ifra Saqlain
Glad to hear :)
1
Paul Hughes
Hi Ifra Saqlain,
I meant to ask one more question.
I have a form that has conditions that show certain questions depending on what the requester picks. If a user picks the New Starter form for example it hides the subject description and presents a new set of questions, one really annoying piece about this is the requesters view under my activates shows all the questions within that form, but none of these questions are related.
The ones highlighted yellow are not presented to the user when submitting the ticket, is there way to hide these from the myactivities section?
0
Sam
Paul Hughes A solution for hiding unwanted custom fields from the customer view is available at: Tip: How to hide blank ticket fields on customer side
There are a few different modifications in the comments of the post, depending on if you want to hide checkboxes, etc. as well!
1
Paul Hughes
Thanks Sam,
That worked for me.
Paul
0
Andrii Kharkavyi
Hi there!
I suppose the answer to my question may be found somewhere above, but I've spent quite some time trying to make it work, but cannot succeed. So my situation is the following.
I am trying to hide and autofill Description and Subject fields in one of the forms we want to start using.
I've managed to make this piece of code hide Description and seeking an advice here what should be added to to hide and autofill Subject as well:
Some things which potentially may be the code behavior:
I would really appreciate any help with my question..
0
Tipene Hughes
Hey, Andrii Kharkavyi!
Can you send through the URL to your help center so I can take a look at this in a bit more detail?
Thanks!
Tipene
0
Ifra Saqlain
Hello Andrii Kharkavyi, please share the URL here so I can get more detail as Sir (Tipene Hughes) said and provide you the solution.
0
Nicole
Ifra Saqlain can you possibly try to help? I am also trying to hide the subject on one particular form. Sandbox HC is here. I've tried code several different ways and I can't seem to get it to hide. Can you maybe pinpoint what I'm doing wrong? Thank you!
0
Ifra Saqlain
Hi Nicole,
See the issue in your script code:
Remove those last brackets:
Team
0
Nicole
Thanks, Ifra Saqlain! So that was in our testing environment. I updated that, it worked perfectly, and then I moved to prod. Unfortunately, now I can't get it to work in our prod environment. Can you possibly have a look again? HC here.
0