I don’t think that a bidirectional relationship field here is really what you need. Making a bidirectional field implies that when you are editing the cast member you can select what productions they are in, which would mean another repeater field so that you can also enter character names on the member page and there would also need to be a way to check these two repeaters to make sure that these 2 repeater field match up. This is all possible, but difficult and probably overkill for what you want to do.
Instead I would not use an ACF field on the cast member side. I would use a standard WP meta field. Still not all that easy though.
I don’t have code, and I don’t know of any existing code to use as an example, but this would work similarly to a by directional field. The difference is that you’d need to use an acf/save_post filter with a low priority (<10) so that you can compare the old rows of the repeater with the new rows. You’d need to figure out what relationships need to be removed and which need to be added. Then you’d need to get each of the member posts and update the value on the other end.
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've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.