Recent searches


No recent searches

How to change the name of the "subject" field in the ticket forms?

Answered


Posted Nov 14, 2019

We have an interesting situation that is causing us some grief. We support students and educators. When they fill out our support ticket forms, they see a field that says "subject". To most users, this would seem to be the subject of their issue report. But for our users, a huge number of them think it's the subject they are studying or teaching in school. 

This means that we receive an inordinate number of tickets with the subject "math" or "english" and nothing useful that we can work with in our various reporting and tracking needs.

I realize that the "subject" field is a system field that cannot be altered via the Zendesk admin interface. However, I know that in the past I have seen creative solutions posted here that take advantage of code to make alterations to many parts of the interface. 

However, all my searches are coming up empty on this one.

Bottom line: I am looking for a way to change the field title "subject" to something else, such as "topic of your request".

Any help would be appreciated!


0

28

28 comments

Hi Marci,

You should be able to change the Subject field label in the Admin > Manage > Ticket Fields:

 

Find the Subject field and Edit it:

 

Then change the "Title shown to end users" field:

That should do it.

0


O....M....G...... This is nuts! Yes, that worked. Hah! 

But what the heck....I have read and been told repeatedly -- even by Zendesk support staff -- that this is a system field that cannot be altered. 

Well...problem solved!! Thank you.

0


image avatar

Devan La Spisa

Zendesk Community Manager

Hey @...,

Our mods are pretty incredible like that, and @... is no exception! Glad you were able to find a solution in the Community, and thanks for posting such a well thought out question for other users to learn from!

0


Hi Devan,

 

How can you make "Title shown to end users" appear different on other forms? i.e.

Form 1: Subject = Topic of your request

Form 2: Subject = Issue

Form 3: Subject = Short Summary

Thanks,

Louis

0


Hey @...

Where are you presenting your forms to your end-users? On your Help Center or the Web Widget? Or both?

On the Help Center you're able to change this text with a little bit of coding.

$( document ).ready(function() {
//Store the ticket form ID
const ticketForm = location.search.split("ticket_form_id=")[1];

//Create if statement for each of your forms
if (ticketForm == FORM_ID_HERE) {

//Change the subject label text
$(".request_subject #request_subject_label").text("Add your desired Subject text for the specific form here");

}
});

If you're using Copenhagen Theme with the v2 framework, you need to add a reference for jQuery in the document_head.hbs template in order for the above snippet to work.

I don't believe it's possible to change the Subject label in the Web Widget though.

0


This worked for me! Thank you for sharing!

0


image avatar

Grant Foster

Zendesk Luminary

@... Is it possible to also do this for the "Attachments (optional)" field?

0


Hey @Grant Foster

You sure can!

It's all about locating where to change the text in the DOM.

For the "Attachments (optional)" the code would look like this:

$( document ).ready(function() {
//Store the ticket form ID
const ticketForm = location.search.split("ticket_form_id=")[1];

//Create if statement for each of your forms
if (ticketForm == FORM_ID_HERE) {

//Change Upload Label
$("#upload-dropzone").prev("label").text("Add something here")
}
});

You can leave out the if check for formid if this is not relevant for you :-)

 

0


image avatar

Grant Foster

Zendesk Luminary

Awesome that works perfectly, thanks Simon. Was just the upload-dropzone stuff I was missing.

 

Just for future reference if someone stumbles on this using the code above, you can substitute out the last line for //Change Upload Label with the below to change the subject, description or attachment label/titles

//Change the subject label text
$(".request_subject #request_subject_label").text("Add your desired Subject text for the specific form here")
//Change the description label text
$(".request_description #request_description_label").text("Add your desired Description text for the specific form here")
//Change the attachment label text
  $("#upload-dropzone").prev("label").text("Add your desired Attachment text for the specific form here")

0


Hello, 

I have a similar request, I am looking to add a 'hint' to my subject for one specific form. Can anyone tell me how to do this? 
I have accomplished this for the description but cannot seem to find the correct syntax for the subject. 

I have tried replacing Description with subject and that didn't work. Also if anyone could point me to where I could find the correct syntax for future reference that would be appreciated.

Thanks in advance! 

// Description - Subtext

if(window.location.href.indexOf('XXXXXXXXXXXX') > -1){ // XXXXXXXXXXXX is the ticket id
$("#request_description_hint").html('This is the custom hint for the description');
}

0


image avatar

Brandon (729)

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Hi @... - 

Try This

$(".request_subject").append('<p id="request_description_hint">This is the custom hint for the subject.</p>');

-1


Thank you @..., this worked perfectly! 

0


image avatar

Grant Foster

Zendesk Luminary

Do we know if it's also possible to change the name of the "CC" field too?

0


Hey, do you know if it's possible to change the"Name" field ?

In french we use "Name" for "Last Name" then when filling fields in the widget, customers just indicate their Last Name .. 

I wish we could just specify something like Complete Name or a description "Please indicate First name and last name"

Any thoughts on that ?

0


image avatar

Christine

Zendesk Engineering

Hi Maxime,

Currently, it is not possible to edit the system fields 'Name' and 'Email' on the web widget. It is not possible to add a description on the fields as well.

As a workaround, you can include a text before gathering info to let the customer know to include their first and last name on the 'Name' field. For example:


0


Simon Boe is it possible to do this based on a field value?

ie.

if support issue = "document upload" then description title reads: "please attach documents"
& if support issue = "tech issue" then description title reads: "please provide screenshots of the issue"

0


image avatar

Julio H

Zendesk Customer Care

Hi Zach,
 
Thanks for your feedback.

This is not currently possible. As a workaround, you can use conditional fields. 

Creating conditional ticket fields

When an end user selects a value from the field support issue. Then the system can show a different type of fields to request different information from each value in that field. 

For example:

If user selects support issue = "document upload" then show the following fields: Do you attach your documents? (yes / no)

I hope it helps. 

0


I'm needing help, I used the code above to append to the subject description, but I would rather just have that old default description be hidden. What code would I need to do that?

0


image avatar

Brandon (729)

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Hey Lydia,

You should be able to edit this in the Admin Center > Ticket Fields > Subject, no code necessary!

Hope this helps!

Brandon

0


Hi Brandon, thank you for letting me know! I'm needing the description to just be different for this one form, but otherwise want it the same across the board and am not sure how to do this. I really appreciate your help! 

0


ah ha! I was able to figure it out, I needed to filter it by the specific text for it to know what text to change. Code below: 

if (ticketForm == 26011737489683) {
         
          //Change the description for the subject field
          $("#request_subject_hint").filter(":contains('former text here')").text("new text here");

  }

1


image avatar

Brandon (729)

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Glad to see you figured it out Lydia Forsyth - and thanks for sharing it back here!

1


Hi Brandon (729)

On a related note... how do I edit/remove the Ticket Form Title?

When inspecting the page I can achieve this by altering the code, but can't work out where to put this in my CSS etc. Thanks for any pointers!

0


image avatar

Brandon (729)

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Hey Matt Farrington Smith,

Two options here - make sure you have jQuery installed:

Option 1: 

var ticketFormName = $('#request_issue_type_select').find(':selected').text();
var $ticketTicketTitleEl = $('.new-request-title').first();
if (ticketFormName) {
    $ticketTicketTitleEl.text(ticketFormName);
}

Option 2:

  $('section.main-column h1').html('Your Custom Title Here');

Hope this helps!

Brandon

1


Thanks a bunch Brandon (729)!
Whereabouts should I put that code? I've tried the usual places but nothing is changing for me :hmm

0


image avatar

Brandon (729)

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Hey Matt - 

Code like this usually goes at the end of your script.js file.  You will need to install jQuery in your document_head.hbs file first.  I've personally had more success with Option #2.  Let me know!

0


Hello,

 

 Anyone figured out for the CC Field? 

 

0


image avatar

Jakub

Zendesk Customer Care

Hello,
 
Templates have access to various properties of your help center. For example, the New Request Page template has access to an object named new_request_form that has properties as per the form requested by the User. You can use dot notation to pluck information from the object. 
 
Example:
{{new_request_form.ticket_fields}}
 
Now, as the new_request_form object outlines > https://developer.zendesk.com/api-reference/help_center/help-center-templates/objects/#new-request-form-object
 
You can access its property > ticket_fields
ticket_fields array An array of ticket field objects containing all the standard and custom fields of the selected ticket form
 
You can see the array of Fields for this Form :
console.log(props.requestForm.ticket_fields)

 
Which will render the array of ticket fields for this Form selected :

 
And then if you want to know the level of subkeys/subprops for this Ticket Field Object, here it is > https://developer.zendesk.com/api-reference/help_center/help-center-templates/objects/#ticket-field-object
 
Then you can set the Field value as the property/attribute is accessible.
 
And thus something like :
props.requestForm.ticket_fields[0].value = "Description from Props"
As the index [0] from this Array is indeed my description field.
 
Would set the value, example (basic example use case) : 
 

 
Result:

 
You can tailor this process for CC field accordingly

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post