Support

Account

Home Forums Backend Issues (wp-admin) Filtering a relationship field in a repeater from a select field value

Unread

Filtering a relationship field in a repeater from a select field value

  • Hi, going a little crazy with this one…

    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…

    1. 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.
    2. I am populating the select field dynamically with terms from a custom taxonomy (Competencies) – this part works fine.
    3. I have a second custom post type (Questions) where each post is categorised with a term from the custom taxonomy (Competencies).
    4. 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.

    Any ideas?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.