How to create a conditional dropdown menu in Strapi?

I am working with Strapi v4.20.5. In my project, I have a form with two dropdown menus: “Category” and “Sub_Category.” Currently, when I select a category, the “Sub_Category” dropdown shows all available sub-categories, regardless of the selected category.

What I need is for the “Sub_Category” dropdown to display only the sub-categories relevant to the selected category. For example, if I select “Configuration Assessment” as the category, the “Sub_Category” dropdown should only show the options “Cloud” and “OT.” Other sub-categories should be hidden.

Please see the attached image for reference.

How can I achieve this behavior in Strapi? Any guidance or examples would be greatly appreciated.

Thank you!

This topic has been created from a Discord post (1249701459906400276) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

You can try also this custom field, but you need to copy the plugin folder from this repo and pasto into your project. If you want too see how to configure you can download the repo and look how it work with dummy data. If want to try it I can help you with the configuration