FR: Allow multiple instances of a configured field in a single field layout #8497
-
This would likely be a big change, but thought I'd throw it out there, perhaps to be considered with #1524 Field configuration can be complex, especially with a heavily configured Matrix field. Use-case:A fairly common practice for module page building seems to be including a mega "Content Matrix" field, with many block types for all types of content. This has a breaking point when you need two independent sets of these blocks (e.g. Content Matrix Main, Content Matrix Sidebar). Duplicating a second field is tough, and keeping them in-sync over time is even harder. This could potentially also be a solution for issues like #806, as each field instance could have it's own title and instructions. I toyed around with the idea of creating a plugin with a "Proxy FieldType", where the only field setting was a field selection of the field you wanted to mirror. Works great for things stored in |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 7 replies
-
What I've done for this in the past is creating a Field Group that encompasses everything that should be added to a new section. There are a couple of issues with this, however.
I think this is one of the reasons why Neo is popular, it lets you use field layouts with block content... and re-use them. Part of the flexibility of Craft is that you can re-use fields, and you can add/remove fields from any Section layout or matrix block. Still, it'd be pretty interesting to have a "Field Container" or such which would be a collection of arbitrary fields, but in the Field Layout editor, it's treated as one chunk that's always moved together. If you want to change what fields are in it, you change those in the Field Container settings... and any changes made there would globally affect any instances of that Field Container. Really, we're just looking for a way to group fields together in more than just an organizational manner (which is still useful in its own right). |
Beta Was this translation helpful? Give feedback.
-
Agree it would be nice. |
Beta Was this translation helpful? Give feedback.
-
I just want to say, I am really looking forward for this feature. Thanks, this would be great feature. |
Beta Was this translation helpful? Give feedback.
-
Bumping this discussion as the newer capability of being able to apply custom labels to reused fields in the layout designer made me think of how nice it'd be to be able to re-use fields giving them custom handles or something, but had no idea how it could be implemented. I think OP's idea of a proxy field would be a great solution. To throw in another use-case: we typically run into this issue when mixing common matrix blocks with entry-level fields, particularly with singles/unique pages that also contain shared matrix blocks. If the unique fields are only above or below the matrix blocks, we can set up the layout like so: However, it gets dicey when the unique entry-level fields are in-between matrix blocks, like so: In situations like this, it would really clean up the experience if we were able to just somehow re-use the same matrix field in the field layout designer above and below the unique entry fields, rather than clutter up the shared matrix with blocks only used in a single location. |
Beta Was this translation helpful? Give feedback.
-
I would like to see that. |
Beta Was this translation helpful? Give feedback.
-
Craft 5 is out with the ability to create multiple instances of individual fields within a field layout. 🚀 |
Beta Was this translation helpful? Give feedback.
-
Is there any specific reason why this does not work with asset or matrix fields? |
Beta Was this translation helpful? Give feedback.
-
Craft 5.3.0-beta.1 is out with support for multi-instance relational fields 🎉 (#15400) We’re targeting August 6 for the GA release. If you’d like to test ahead of time, change your "craftcms/cms": "^5.3.0-beta.1", and then run |
Beta Was this translation helpful? Give feedback.
Craft 5 is out with the ability to create multiple instances of individual fields within a field layout. 🚀