Home › Forums › Add-ons › Repeater Field › Using a repeater field as a relationship custom field › Reply To: Using a repeater field as a relationship custom field
I have 2 examples here https://github.com/Hube2/acf-dynamic-ajax-select-example that if you use some of the ideas from both you could do this. One of the examples is how to populate a select field base on another select field https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-select-example and the other is how to populate fields based on a selection in a relationship field https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-fields-on-relationship
A post object field and a relationship field are similar, although you may need to do some work to get that working. You can use either example for the AJAX portion, the main difference is that you’re going to be getting values from the repeater in the “Location” post to populate the second select field. Or you can go with just the 2 select field option and populate the fist field the same way that the example shows and the second field from the repeater.
This is actually another good example that I will put together if I have time. “Populate a select field from a repeater based on the selection of a post object 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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.