Home Forums ACF PRO How to add a search feature to ACF checkbox hierarchy


How to add a search feature to ACF checkbox hierarchy

  • Hello, I have created a fairly extensive anatomy hierarchy in ACF PRO for a medical site. This is a taxonomy set to display as checkboxes. The user needs to check the anatomy that a particular post relates to. The problem is that the anatomy list is very long, and users cannot find the item(s) they need. Is there a way in ACF to add a search feature when a taxonomy is displayed as checkboxes?

    I am familiar with displaying the taxonomy as as select field, which is then searchable. However, once you start searching, the user cannot see the rest of the hierarchy, and they are required to select all of the parents of the child elements. So I need them to be able to see the entire hierarchy the whole time. Basically I need the same thing a browser search does, but only in the one field area (not in the whole browser).

    – Knee
    – – Miniscus
    – Hand
    – – Finger
    – – Thumb

    When a user selects “Finger”, they are also required to select “Hand” and “MSK”. So searching for Finger in a select box doesn’t work, b/c they often do not know the name of a parent element that must be selected also. (I’m using easy-to-read examples here. Many of the items are using medical terminology that isn’t easy to read or remember).

  • Would love this feature as well!

  • For feature request you should contact the developers.

    Short of this, if I had to do this I would:

    Use an acf/render_field action to add a “search” input.

    Add custom JavaScript that would set the display css property of the check boxes based on the value entered into the search field.

    This is just a vague outline, I know, but it would take quite a lot of work to make it happen.

  • I have submitted a feature request as I believe this is pretty standard these days and should be implemented.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.