Home › Forums › Feature Requests › Conditional Logic using Taxonomy field › Reply To: Conditional Logic using Taxonomy field
$stored_type should return an array or WP_Error, see this link.
$posted_type should return the value which was selected in the form.
With this value you create an a term object/array, see here.
Now you should have 2 values to compare.
I think you should look into defining $_POST[‘acf’] differently.
AFAIK (but I can be wrong), the fields are only defined by key and not by name.
So I would change
$_POST['acf']['field_picktype']
to
$_POST['acf']['field_key']
like I did in my example.
If you don’t know how to find them go to Custom Fields > Field Groups > Your group > Screen options > Check Field keys.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.