This can be done by :
– 1st : pusching the selected data to the ajax request. For this you should use
Let say ajaxData.myparameter = getField(yourselectbox)
– 2nd : Once this is ok, use the acf/field/post_object/query on php side.
This filter is used to retrieve information and add them to the query.
For this get $_POST[myparameter] ?? get_field(yourselectbox).
$_POST : used to get ajax value from JS.
get_field() : used when you update the page to used the current saved value for yourselectbox.
Then you update the query to get the value for the other fields.
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!
© 2022 Advanced Custom Fields.