Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Zendesk also cannot provide support for third-party technologies such as JavaScript, jQuery, or CSS. Please post any issues you have in the comments section or try searching for a solution online.
Question
How can I remove Suggested Articles from the ticket submission form?
Answer
Suggested articles are what users see when they type the subject of their request into the submit a request form on Help Center.
To remove Suggested Articles:
- In Guide, click the Customize design icon (
) in the sidebar.
- Click the theme you want to edit to open it.
- Click the options menu and select Edit Code.
- Select the style.css tab and search for the following words: suggestion-list
- Replace all the highlighted sections with the following:
.form .suggestion-list {
display:none;
}.form .suggestion-list label {
display:none;
}.form .suggestion-list li {
display:none;
}.form .suggestion-list li a:visited {
display:none;
} - The CSS should look like this:
- Click Save.
For more information about customizing your Help Center template, see the article: Editing the code for your live help center theme.
32 comments
Sam
I was able to achieve this by adding the following line into script.js:
The 'searchbox' element is contained within the 'suggestion-list' element, so suppressing the parent element effectively hid it.
4
Dave Dyson
Thanks for sharing your solution, Samuel!
1
Wade Fitzner
Are there older, different or more possibly....hidden files that I am not seeing to make this change?
suggestion-list does not exist in my style.css, nor the page I am working on.
Im trying to add some code to hide the suggestion list for one pulldown, but have it available for another. I've emailed support, with no responses.
It will more than likely be an addition like this....
In the HTML
form <li class="suggestion-list">Subject Dropdown #1</li>
And in the CSS
.hidden{ display: none }
Any help would be appreciated.
0
Christopher Kennedy
Hi Wade,
The code you add will first need to detect that the conditions where you wish to hide suggested articles are present. This will most likely be easier with Javascript. Once your code identifies this, then it can use the one-line snippet that Samuel shared to finally hide the suggested articles.
Best,
0
Anita Rajkumar
How to hide suggested articles only when tab out from email subject?
0
Dave Dyson
0
Anita Rajkumar
onmouseout - is it possible to hide when the user moves the mouse away from email subject
0
Tipene Hughes
Something like this should do the trick:
You'll also need to add
display: none
to the.form .suggestion-list
styling:I hope this helps! Feel free to reach out with any questions.
Tipene
0
Autumn Fair
Is there a way to limit the articles suggested based on the form a customer selects? I really like having Suggested Answers but we have some articles that are very similar so the list can look repetitive. Instead, I'd like a way to only show suggestions from a specific category for each form. Thanks in advance for any ideas you have!
0
Vlad
Hey @Autumn Yes that is doable with a help of ZD API. You should use the Search endpoint with scope to the needed category on each ticket form.
1
Raphaël Péguet - Officers.fr
Hi all!
It is possible to get the syntax that will make it possible to filter the suggested articles based on the label please ??
Best regards,
1
Tony Jansson
Hi,
Is it possible to limit the results to be for example maximum 3 results for suggested articles?
Best Regards,
Tony
0
Vlad
Hey Tony, just add this at the end of your theme CSS file, it should do the trick.
2
Tony Jansson
Thanks Vlad! Just pasted it at the bottom and it worked :)
0
Lolu
Hello,
I have a slightly different question. How do I make the suggested articles open in a different tab? Vlad Tipene Hughes
0
Tipene Hughes
Hi Lolu,
There isn't a native way to open the suggested articles in a new tab on click, past right clicking the link and opening in a new tab. One way you could achieve that programmatically is by using a mutation observer to watch for the links that are dynamically generated, and adding the required attributes to them. Here's an example of how that could look:
0
Raphaël Péguet - Officers.fr
Hi Zendesk community,
Any updates on this one?
Best regards,
0
Justin Federico
Is there a way to limit the suggested results by ticket form? We use multiple forms and we only want to see suggestions from the relevant KBs depending on the form selected.
0
Vlad
Yes it is, using ZD API search endpoint.
0
Justin Federico
Thanks, Vlad!
Where/How would this be applied to the ticket form?
Any other info would be greatly appreciated.
0
Erica Girges
I believe this would be the endpoint you're looking for the Help Center's Search API.
There are a few ways you can achieve what you're looking for.
By using the API, you would essentially be building out your own suggested articles functionality and search results.
Another way to configure this is to look into using Answer Bot with your web forms. This will allow you to use labels to refine search results per form. It might be best to look into this way first as the search functionality itself is already built in and you would just need to apply labels. You can get more info on best practices for using labels for Answer Bot here.
Hope this helps!
Erica
0
Sandra Campbell
hello
I'm trying to implement Sam's suggestion
(see his comment back from May 4, 2021:
https://support.zendesk.com/hc/en-us/articles/4408881724314/comments/4408889510554 ) which I've also pasted in bold below)
It didn't work for me. I pasted the code at the end of the script.js before the final close brackets for the main function. Is that the right spot (I'm a newbie so any help much appreciated).
thanks, Sandra
I was able to achieve this by adding the following line into script.js:
The 'searchbox' element is contained within the 'suggestion-list' element, so suppressing the parent element effectively hid it.
0
Sam
Zendesk Admin Hi Sandra!
Two things should make this work. In your script.js file, make sure the above code is somewhere within a document.ready function, like so:
You can enter the code into an existing document ready function, or use the one above.
Second, you'll need to ensure that jQuery is installed in your environment for it to work. Please see Importing or upgrading jQuery for more information.
Let us know if that gets things going in the right direction for you!
1
Sandra Campbell
Thank Sam, that worked!
0
Rina
We have an article which we want to display on the website to customers, but not on the list of suggested articles that appear in the automated first response.
Is there a way to omit specific articles from being suggested?
0
Bradley Lowes
Hi,
I am wondering if this is a simple copy and paste job to make customers open the link on a separate tab? Tipene Hughes
https://support.zendesk.com/hc/en-us/articles/4408881724314/comments/4649148399770
I don't have the coding or technical knowledge, although my team leader would prefer this functionality. please can you advise.
Many Thanks,
Brad
0
Maggie
Is there a way to prevent a specific article from being suggested in the list of recommended articles?
0
Mike DR
0
Damien Messé
Hello, we have deactivated the subject field on our contact forms as we already ask our customer to categorize the ticket using dropdown custom fields.
Is there any way to use the article suggestion on other field than the subject field ?
Thanks
0
Aaron Knizner
I had a question similar to Justin's above, but did not understand the solution.
I want to hide the suggestion list when a user is using one specific form (called “Emergency Outage”), but keep the functionality active when user is submitting a request on any of our other forms. Is there a way to do this conditionally based on form name or other identifier?
0