Add images to dropdown select?

By: Ciara Polachuk | Asked: 09/01/2023
ForumsCategory: How-toAdd images to dropdown select?
Ciara Polachuk asked 1 year ago
Does anyone know if there a way to add images to a dropdown select? I know we can use images with radio buttons, but we want to add 100+ options in a select box, so radio buttons won't work here. Would also be ideal if there is a way to search in the select (since we'll have so many options). Thanks for any insight or direction!
1 Answers
Victor Font answered 1 year ago
Not exactly.  You can set a select to autocomplete to enable searching. Images are a different story because of a select element’s architecture.  I would show an image next to the select and change it each time a new option is chosen. You can see an example of how this works if you visit this page and select a different country: https://formidable-masterminds.com/developers-directory/
Gregory TulipaniGregory Tulipani replied 1 year ago

How do i do this? This is exactly what i need for my website and i cant figure it out. Any help on how to set this up would be greatly appreciated

Victor Font replied 1 year ago

The example I gave you above is done with AJAX and a custom PHP callback. It's custom development.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right