Recent searches


No recent searches

Easily Make Your Zendesk Help Center Dropdown Fields Searchable



Posted Jul 24, 2024

Hello Zendesk Community!
 

I'm excited to share a solution I've developed for a long-standing issue many of us have faced: making dropdown fields searchable in the Zendesk Help Center. 
This lightweight, efficient utility provides a seamless searching experience for dropdowns and offers additional customization options and better UI.

Request Thread here:

 


 

Here's how you can add this to your help center
 

1. Add the CDN to your Help Center Open your document_head.hbs file and add the following line.

<script src="https://cdn.jsdelivr.net/npm/zenselect@0.1.5/dist/zenselect.min.js"></script>

 

 

2. Add the script to your new_request_page.hbs file:
 

<script>
    document.addEventListener('DOMContentLoaded', function() {
        zenSelect('4520048004116',{"placeholder":"Select or Type","emptyMessage":"No Results"});
        zenSelect('field_id');
        zenSelect('4514796809492',{"placeholder":"Choose who you are"});
    });
</script>
  • Replace '4520048004116', 'field_id', and '4520371651476' with your actual dropdown field IDs.


 

 

That's it! Your dropdown fields should now be searchable. ✌️ 

(In fact, Utility takes care of all complex manipulations)

 

 

Additional Customization: 

 

This solution also allows for easy customization:

1. Custom Placeholder for dropdown
 

zenSelect('4520048004116', {"placeholder":"Select or Type"});

2. Custom No Results Message:

zenSelect('4520048004116', {"emptyMessage":"No Results"});

You can combine both options as shown in the initial script.

 

This solution replaces the old-style dropdown with a more user-friendly, searchable version. It's lightweight, efficient, and easy to add to your help center.

I hope this helps solve a problem many of us have been facing for years. If you find this useful, please consider supporting my work by buying me a coffee ☕ | https://www.buymeacoffee.com/phoenixer

 

Feel free to ask any questions or share your feedback in the comments below!

Note: Zendesk has already planned to implement this feature, though the rollout date is uncertain. In the meantime, delight your end-users with a seamless selection experience.

Nested dropdowns are not supported at this moment. However, based on feedback and demand, this feature will be included in a future version.
 


5

10

10 comments

Awesome!  Is there any way to get it to search through the levels of the field.. i.e if my field value is Level1::Category2::Answer, and I want to search for “Answer” when I type that, it pulls the result. 

 

Currently, I can only see it finding the top layer. 

0


Daniel Silvestro 

I'm currently working on adding support for multi-level/nested dropdown fields, which I expect to be available in next release by early October.

 

2


Apologies, I read the line about Nested Fields after I hit submit!! I was a little excited. Absolutely following this.. thanks!

0


has anyone had success with this? when trying to implement this is only removing the field from our form? any help would be great!

1


we are trying to implement this on a conditional field. do you know if this is a restriction to only be used on non-conditional fields, meaning only on 1 form type? TYIA for the help

0


Melody Josey Yes, it works perfectly for me - I didn't try this on a conditional field however.

0


Hi Melody Josey 

Yes, currently it does not work correctly for the conditional field however if you have a non-conditional field then It should work on any number of forms.
 

0


Sushant A - Is there an update on making this applicable for nested field values?

1


Olá, 

Já está disponível a nova versão para campos com condicionais?

0


image avatar

Elaine

Zendesk Customer Care

Hi Gustavo, 
 
Could you please clarify what new version of conditional fields you are referring to?
 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post