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

  • 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)

The topic ‘Get parent value from child in flexible content acf’ is closed to new replies.