Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Allow multiple instances of a configured field in a single field layout #2403

Closed
timkelty opened this issue Feb 6, 2018 · 3 comments
Closed
Labels
enhancement improvements to existing features system administration 💼 features related to system administration

Comments

@timkelty
Copy link
Contributor

timkelty commented Feb 6, 2018

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.
It would be ideal if one could create a field and use multiple instances of it in a single field layout.

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 content, but obviously gets complicated with Matrix and others, which is really what you'd want it for. Let me know if you think this might be do-able and/or more appropriate via plugin, or if it is something you'd consider for core/v4/fantasy land.

@khalwat
Copy link
Contributor

khalwat commented Feb 6, 2018

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.

  1. If you change the Field Group, it doesn't change the fields actually added to the section(s); it's really just organizational.
  2. You can't then use these Field Groups in a Matrix block

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).

@brandonkelly
Copy link
Member

Agree it would be nice.

@brandonkelly brandonkelly added the system administration 💼 features related to system administration label Feb 25, 2018
@brandonkelly brandonkelly added enhancement improvements to existing features and removed feature labels Mar 5, 2019
@brandonkelly brandonkelly added this to the 4.0 milestone Mar 21, 2019
@foxtrotcz
Copy link

foxtrotcz commented Apr 26, 2021

I just want to say, I am really looking forward for this feature.
A lot of time I am using simply configured fields like plain text or table and I would like to use more instances of that fields in field layout.
For example. If you have plain text field Email and you want to use it multiple times, it makes more sense to use multiple instances of same field (inside field layout) than configuring multiple fields like Email1, Email2, Email3...

Thanks, this would be great feature.

@craftcms craftcms locked and limited conversation to collaborators Jun 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement improvements to existing features system administration 💼 features related to system administration
Projects
None yet
Development

No branches or pull requests

4 participants