Hi, I try to do the following.
I have four custom post types, "contact", "team", "members" and "task".
I have created a many-to-many relationship between contact and team (members), so in this way, in "members", I store the contacts that belong to a team, since a team can have many members and a contact can be a member of many teams.
Then I have the custom post types "homework", where I store the tasks that will then be assigned to a member of a team. Between "team" and "homework" I have a one to many relationship, since a team can have many tasks.
The theme is the following:
I have a cred form "new task" where I create a task and assign it to a "member" of a particular "team". To do this, within the form I try to show two selectable selections, one with "team" and another with its "member" where I first want to select the "team" and then in the other drop-down select to show all the members of the team selected before.
I know that I can create a view to fill the drop-down selections, but I can not understand how to show in the drop-down select only the members that belong to the previously selected team in the previous drop-down select.
In the cred "tasks" form I already have the drop-down select with its parent "team" (_wpcf_belongs_team_id)
Can you help me with this?