Add image to Lookup options

By: Jan Siwinski | Asked: 09/25/2025
ForumsCategory: How-toAdd image to Lookup options
Jan Siwinski asked 7 months ago

Hi folks,

I've recently set a title, subtitle and image as the options in a dynamic checkbox field, and whilst I love it, I need it to be searchable within the form. I don't think that's possible so I'm exploring doing the same thing but with Lookup fields. This is proving an absolute nightmare, to the point I think it's just not possible.

Can someone put me out of my misery and let me know if it is or isn't possible please. And if it is, a point in the right direction. I know you can print urls from upload fields to Lookup field options but as for showing the image or a third text field I'm thinking its a no go.

Attachments

Rob LeVineRob LeVine
Staff replied 7 months ago

What does "searchable within the form" mean? As an old boss of mine used to say, "It's software, anything is possible".

Jan Siwinski
replied 7 months ago

It's a checkbox list full to the brim with exercises. Rather than the user having to scroll the whole list, as they'll likely be making several selections in one go, I'd like them to be able to start typing into a checkbox, and have the most likely (or preferably exact) options from that checkbox come into view

2 Answers

Best Answer

Jan Siwinski answered 6 months ago

Thanks for your input gents.

After much playing around, I couldn't get Lookup fields to hold an image in the way a dynamic checkbox can. I'm sure you professional chaps could, but it was beyond me. 

I also had too many other things dependent on my set up as it was. Sections and repeaters showing/hiding depending on exercises and copying title text over sequentially to the repeater fields etc... 

I found the following little gem on Stackoverflow, so I just implemented this. With some extra jiggling and juggling it works great!:

https://stackoverflow.com/questions/44406419/create-a-dynamic-search-bar-for-checkboxes-elements-javascript</a&gt;

Attachments

Victor Font Staff answered 7 months ago

Wait a minute! Let's step back to the checkbox. What and how were you searching for that wasn't working for you? The reason I'm asking is because regardless of how checkboxes are displayed on the from end, the value(s) are always stored in the database the same way. The front end display has nothing to do with searching for values. What were you doing that made you abandon the process?

Jan Siwinski
replied 7 months ago

I still have that form, I just created a second to see if I could make it work with Lookups as I know they're searchable when Checkbox is selected as the type.

No attempt made as such, just research done tonight. Most examples are cascading which I don't really see how that would work in this instance. Or another was with entries in a view.

Victor Font
Staff replied 7 months ago

Elect fields offer the search feature. If you're going to use a select field, use the dynamic lookup. It offers the greatest flexibility for reporting options later on.

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