I’ve read numerous support threads that are similar but not quite the same scenario so here goes, I’ll try and explain as succinctly as I can…
I have a custom post type (Interviews) in which each post has a repeater field that contains two sub fields: a select and a relationship field.
I am populating the select field dynamically with terms from a custom taxonomy (Competencies) – this part works fine.
I have a second custom post type (Questions) where each post is categorised with a term from the custom taxonomy (Competencies).
I need to be able to dynamically filter the relationship field based on the chosen value of the select field. In other words show the questions related to the specific competency – all the while within a repeater so each interview can have more than one competency, each competency can have more than one question.
I know I can achieve the above using a dirty workaround – by having multiple question relationship fields and show / hide the relevant ones using conditional logic. Not ideal as the list of competencies may grow or change over time and this would require manual intervention.
Viewing 1 post (of 1 total)
The topic ‘Filtering a relationship field in a repeater from a select field value’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users