Custom inline field type

I’m experimenting with Contentful for a choral website, and was wondering if it is possible to create a custom field type (not content type) that can be edited inline and include a relationship.

For example, choral Seasons have a list of Singers (could be modeled as Relationship), but singers may have a different voice part per season. In a database this would be modeled as a join table, where SeasonSinger would have a reference to the singer and a part enum. However, I do not want to create a top-level SeasonSinger content type in Contentful. These records are not reusable, and are specific to a specific season and member.

I would like to be able to create a custom field type that accepts some other fields and a relationship, but am unsure if this is possible in Contentful. Ideally, it would be possible to edit these values inline with the rest of the Season page when adding a new season. See Sanity - Object Type for an example in another headless CMS.

Any suggestions for how this could be possible, ideally without creating a content type? My main problem with content types for something like this is that it doesn’t make sense to have a top-level record for each relationship (cannot be referenced anywhere else) and using the nested editor doesn’t make sense for a large list of simple relationships.

Hi @kendall_cantate,

Although I understand your use-case, I’m not sure Contentful support such a functionality, neither I think it’s possible to emulate it with some proper configuration.

The reason behind it is that, as our CMS evolved, we decided to have relationships between entries by having linked entries of different Content-types. What you describe is kind of a pre-defined list of values, that, as you said, can be joined together, and more mostly dependant on the specific entry, instead of being of general use.

Hi @Alma, thanks for the reply. I didn’t think this use case was supported, but thought I’d check. As far as pre-defined list of values, I was more intending something like the following. Create a Season (which is a standard relational object), then create a list of one-off SeasonMember entities (essentially a join table), which have a title string and relationship to an existing Member. This would essentially be mapping members to a season, but with a temporary content type/field object that could be created when associating the record. This is instead of creating yet another SeasonMember relational type, and having to create new entries in this type vs just creating a inline object type for the join relationship.