Support

Account

Home Forums Add-ons Flexible Content Field Get parent value from child in flexible content acf

Unread

Get parent value from child in flexible content acf

    • Mat

    • June 20, 2020 at 7:44 am

    Hi,

    can you help me on that issue please.

    I would like get the parent value from a child in array type flexible content

    exemple:

    function my_acf_prepare_field( $field ) {
    
        //debug // only used for debug the array
        $field['choices'][ '' ] = var_dump($field); // i m the child, i would like get parent value    
    
        return $field;
    
    }
    // Apply to fields named "example_field".
    add_filter('acf/prepare_field/name=example_field', 'my_acf_prepare_field');

    Why ?

    Because i use the action “acf/prepare_field” for append with dynamical value. (edit post)

    Lets me know if something if something is not understandable

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.