Dynamic required fields in Content Manager, based on other fields' options

Hi there,

I am creating a recipe blog and I have created the content-types Main Categories and Recipes. Each Recipe has only one Main Category.

The 2 main categories are Food and Beverage.

In the Recipes content-type I have a field called Portions to note how many portions the ingredients of the food recipe are for. If it is a beverage recipe I don’t need this field.

What I’m looking for, is to have “dynamic” required fields in content manager, for the Recipes, based on the Main Category that is selected, in order to help my content creators.

If the main category selected is Food then I want the “Portions” field to be required. If Beverage is the main category selected then there is no need to have the “Portions” field as required.

Just thinking freely, it would be interesting to have the UI change depending on the selected main category (or some other field). To show basically different fields for food recipes and different fields for beverages, keeping only a handful of share basic fields like for example, name, slug etc.

All this is to make my content creators’ lifes easier and to have a better experience during content creation.

How would someone go about implementing this kind of functionality?

P.S. this is my first post, any comments for making it better are welcome!

@Boegie19 I noticed you are very active with responses here and there :sweat_smile: :innocent:

What is your opinion on this post?

you can use a dynamic zone but dynamic fields don’t exist sedly enough

Thank you for your response @Boegie19

I will suggest this feature to Strapi :slight_smile: