This article will teach you how to establish the field dependency for your taxonomies-type fields.
The field dependency allows you to show and hide specific fields on the search form and the form for adding an ad, depending on the selected terms of this taxonomy.
The relations table looks like that - on the top (1) you will find category names; the first column (2) shows all fields you can set relations with.
By default, the entire table has empty checkboxes. If all checkboxes are empty, it means that all fields are visible for each category (ex 1). Similarly, if all checkboxes are checked, it means that all fields are visual for each category (ex 1).
In the second example (ex 2), the fields are only visible in some categories as selected. The Mileage is not visible for trailers and Motorcycle features are visible only for motorcycles.
The field dependency works for the adding page and the listing page. If you set the field as invisible, it will not be visible to any user.
Below, you can see how the looks form for trailers. As you can see, mileage or transmission is not visible.
What is the difference between all checkboxes empty and marked? If the field has any checkbox mark, it is immediately visible on the search form. If the field has all checkbox marks, it is visible on the search after you pick a category.
The Make field is visible on the search form. The Vin field is not visible.
The VIN field is visible after you choose one of the categories - in the below example, the car category.