Reusable fields: Copying fields across models or defining field templates

This is one feature request, but with multiple possible ways of accomplishing the same thing: being able to re-use a field across different models.

Let’s say I have a Modular Content Field with a long list of allowed blocks, some predefined help text, etc. Rather than having to re-create that MCF with all the validations every time, it would be nice to be able to either:

  1. Copy/move it to another model via drag and drop (see screenshot below)
  2. Define it as a “field template” that can be inherited by any model. If the parent template is changed, the models inherit the changes too.
  3. If neither of those are easy to implement, maybe just allow a JSON export/import of a field definition?

I know you can clone an entire model, but that doesn’t help with field sharing between existing models.

Thanks for considering this :slight_smile:

This would be great! We have models that use very similar fields, and it’s very bad to have to copy every part of the field definition (and even if we do copy, if we need to change it, the change must happen on every usage of the copied field).

The approach 2 that Roger suggested would be the best.

Hello @thiago this was released!

https://www.datocms.com/blog/expanding-modular-content-with-single-block-and-frameless-mode#share-fields-across-models-with-frameless-mode

Ah, great. I had seen that “Frameless” option, but never realized how seamlessly it would integrate with the consumer model. Thank you!

@m.finamor The resulting value in GraphQL will be nested, right? No way to avoid this?