Home Forums ACF PRO Filter a Post Object with AJAX Reply To: Filter a Post Object with AJAX

  • You mentioned, maybe in your other post about a country/state type of situation, one of my examples deals with that. I don’t think that any of my examples deals specifically with what you want, but then I’m not sure I completely understand what you are looking to do.

    Reading your other post a bit, I’m not sure that you can dynamically populate a post object field the way that I’ve done with other types of fields, basically because these fields are select2 fields that are already populated using ajax. To make changes to what’s loaded in these fields you would need to figure out how to add the value of your “site” field to the ajax query that ACF is already using and then use that value in an acf/fields/post_object/query filter It would probably be easier to stick to vanilla select fields.

    You also mentioned something about populating a repeater, and there is an example of that.