Contentful logo

Contentful Community

Communication between UI extensions

I am creating a custom slug generator Field extension.
For this, I need to listen to another UI extension called ‘type’.

The ‘type’ field will basically hold what kind of content I am creating (we have different types like Article, Video, Podcast etc)

My questions is-
How do I get the value of the ‘type’ field extension in this slug extension that I cam creating?

As I know the built-in slug only calls from one field. In this case you have to build your own app.
const typeField = sdk.entry.fields[‘your_type_field_id’];
const titleField = sdk.entry.fields[‘your_title_field_id’];
you can get value of those fields such as
typeField.getValue() and titleField.getValue()
After that create your own slug then set back value to your slug field.

Hope it will help you.