Home › Forums › ACF PRO › Filter relationship from another relationship field › Reply To: Filter relationship from another relationship field
Hi @robbiegod,
Thanks for the post.
I would recommend you hook into the acf/load_field filter and use this to pass the selected field object from the other relationship field on the other page.
The code would look like so:
<?php
function my_acf_load_field( $field ) {
//get the field object
$field['value'] = $new_field_value
return $field;
}
// key
add_filter('acf/load_field/key=field_508a263b40457', 'my_acf_load_field');
?>
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.