Home Forums Front-end Issues understanding acf_form Reply To: understanding acf_form

  • When you set

    [post taxonomy] [is equal to] [my_choice]

    You are using the built in Taxonomy in WP.

    [post taxonomy]

    is not an ACF Taxonomy field.

    The taxonomy field in ACF is not a choice field like a radio, checkbox or select. When you create a choice type field you specify what the values will be.

    The values that appear in a taxonomy field are loaded with Select2 which is a JavaScript input field add on. The values that will be displayed in the field are not known until they are displayed on the post to be selected. Well, this is just a theory. This may be a limitation of ACF or the Select2 script.

    When I want to create a field where the user can select something and that selection will be used as a condition on another field I use a standard select field, dynamically populated it, as in the code I gave previously, and then when the post is saved I do all the work myself of setting the taxonomy either with a acf/save_post or acf/pre_save_post filter.