I have a glossary on my website. In this glossary I have two categories: fruits and vegetables. When I publish a new item, I select vegetables, or fruits categories. I created two fields groups: one for the vegetables, the other one for the fruits. Both fields groups are displayed even if I haven’t chosen the right type of item. For instance, fruit group fields is displayed in the glossary edit page when I’m creating a carrot post.
What should I do to display a custom fields group only when a category is involved?