2

Sorry if this is asked/answered elsewhere. I tried to search for it with no success.

Suppose I have a common group of fields that I want to include in different entry types, and each entry will have unique data entered in the fields. A concrete example is:

SEO / Meta

  • meta title
  • meta description
  • meta keywords

Later on I want to remove the "meta keywords" field from every entry type that has this "field group". Is there a way — preferably with core Craft abilities — to set it up so I can update the field group in one place and not have to touch every entry type?

A matrix field with max 1 would get the job done but feels plain wrong for this.

I have the feeling there is another way I just don't know about yet.

1 Answer 1

1

No, field groups are just a way to have your fields grouped in the field layout designer and fields index page. Another advantage is the possibility to drag a whole group in the designer to create a new tab.

Approaches, other than a max 1 Matrix field you mentioned, that I can think of are:

  • multiple predefined rows in a Table field
  • multiple predefined rows in a Set Table field, which allows you to have a read only "Label" column and set a max rows
  • custom solution implementing a new field type that has multiple input fields
1
  • Thanks @carlcs. Nice to know what the options are, and this might be a job for a plugin rather than the overhead of another matrix (from what I've read they should be used sparingly). I have to admit I tried to think of some similar use cases and didn't come up with much (maybe too brain-dead now, or in general). So I'll spare them the feature request :-) Commented May 14, 2015 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.