Hi! I have a problem with a MetaBoxes that using multiple POST type fields.
I have 4 post types for the different structures existed in Mexican Law (Leyes, Títulos, Capítulos and Artículos). I have created a meta box for each one.
In "Capítulos", for example, I have two Post fields (one for Leyes [to select the law on witch it depends] and other one for "Título" [to select the fraction of the law where this "Capítulo" is located]).
The problem is generated because I need to filter to display only the "Títulos" that is registered under the law I selected on the prior field. The logical order for my user is:
Select the law
Select the title
Select the chapter
Note: I'm not using categories because this site require to create a lot of posts of each type and is really difficult for the end user to manage so many nested categories.
I understood, but is not just showing or hiding the input, I need to filter the items available in the second field according to the previous post field. For example: There is many "Titulos" related to different Laws, but if my user selects the "Constitución Política" item, I need to show only those "Títulos" where there is that law selected... like an SQL join.