Creating custom fields in v4

System Information
  • 4.1.0:
  • Windows 11:
  • postgres:
  • 14.19.0:
  • 6.14.16:


I have an application that has many articles which contains a field with many tags. The tags should be related to data which is fetched from my internal api’s.

An example can be ports/harbors across the world which I have fetched from my interal api:

So I have setup a relation field for ports:

But what if the user want to select all the ports which has China in the country field?

If I setup an own content-type for countries which has a relation field for ports, then I can select that with another relation field for countries. But then I should not be able to select the correspondings ports which is already been selected in through the country relation field. This is not so very intuitively from the user-perspective. Can these relations field talk somehow with each other?

A more intuitively way would be something like this:

Is there any way where you could create a custom field where you can pick these tags in a more hierarchically way?

I have seen this post (cannot post more then 3 links):

But this was posted a year ago, and hence maybe some update have been done to the v4 that makes this easier?

A solution would be to create a own custom UI which talks with the strapi REST API, but this would require more work than if this is possible through customizing the admin UI.