Support

Account

Forum Replies Created

  • It works now. I peeked a bit in the code of the class \acf_form_taxonomy. There are two methods which were added since version 5, add_term and edit_term. There are also two actions defined in which you can hook into: {$taxonomy}_add_form_fields and {$taxonomy}_edit_form.

    I am using now the actions to determine which term is currently viewed. I save the current term in the $GLOBAS variable (current hotfix only).

    Next, I am using the acf/load_field/name={$field_name} filter which checks the previously defined term in the $GLOBALS variable on which level we are and to determine if we display the current field or not.

  • Hey John, thanks for your reply.

    I meant term, not the taxonomy.

    I have some required fields defined in my custom fields group. I want these fields only to be applied on the first level (Level 1) of my terms:

    
    * Root Term
    * * Level 1 Term <- Required fields needed and displayed
    * * * Level 2 Term <- Required fields not needed here but are displayed
    

    Level 2 has to be still editable but without the required fields.

    It seems that in ACF4 the custom fields for the terms were loaded over an xhr request which is no longer the case in ACF5.

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