Support

Account

Home Forums Feature Requests Taxonomy Terms in Conditional Logic

Solved

Taxonomy Terms in Conditional Logic

  • Please implement the ability to select taxonomy terms in the conditional logic section. My attached illustration will better explain what I’m getting gat.

    To be honest, I’m surprised this isn’t already a feature. I firmly believe, though, that implementing this will set ACF worlds apart from its competitors.

  • You should see taxonomy terms able to be selected like this if you choose Post Taxonomy as the first rule dropdown.

  • Didn’t work… all that does is give me the option to choose one of the terms.

  • Ohhhhh, you’re wanting it in conditional logic, not as a location rule on an overall field group. You can definitely assign field groups based on if an item is given a certain taxonomy term so you could say display this set of fields if the taxonomy term for admissions is equal to free or equal to paid. It’s just something that has to be done in separate sets of fields.

  • Have a look at the attached illustration, please, to better understand what I need to happen. If there is a way to do it, I am pleading with you to help me get to it.

  • PS: The “Fee Section” is a field group.

  • You can create conditional logic based on a taxonomy field, but it is not straight forward. For this you need to know the ID of the term you want the field to appear on. Lets assume that the term ID of “Paid” is 1. In this case your conditional logic rules would be.

    Show this field if
    Taxonomy Field | Selection is greater than | 0 AND
    Taxonomy Field | Selection is less than | 2

  • That, sir, is very helpful.
    Thank you for your input; I shall give it a try.

  • The only thing I need now is to work out how to get the term IDs…
    Not doing great with that…

  • Go to your taxonomy/term list in the admin. Hover over the link to the term, the URL contains the term ID

  • John, thank you so much for helping me to solve this ‘puzzle’. I’m very grateful and I’ve learned something new.

  • Thanks, @hube2 for the answer! It helped me too.

    I did find a way to simplify the conditional logic to one condition by selecting “Value is equal to” and entering the taxonomy ID.

    Please note that if you have more than one term, you will need to select “Value Contains” instead to make it work.

    Applying this to the earlier example, if you want both the FREE and PAID terms to trigger different actions, you have to use “Value Contains”.

  • Thanks, @acfdog. I’ll certainly bear that in mind

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

You must be logged in to reply to this topic.