Home › Forums › General Issues › Relationship fields filtering over next relation › Reply To: Relationship fields filtering over next relation
Thanks for the question.
Lets assume you are on the edit page for a person, and you want to select 1 event and then 1 Appointment.
You can use ACF to create the Event field (post object field). This will show all Events posts and allow 1 selection.
Next, you need to update / populate the Appointment select field. I would create this as a select field with no choices, and rely on JS to populate is after an Event has been selected.
You could write a jQuery event for the Appointment Change, and then get the Appointments via AJAX, then just update the Appointments select DOM object with the results.
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!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.