Skip to content

Reusing field groups #1592

@seaj1one

Description

@seaj1one

On the frontend there's a big drive to DRY (Don't repeat yourself). There a desire for page builders to add components as a feature. I'd love to see Meta box do the same thing.

Currently, as I'm creating custom field groups, I'm repeating myself. So If I creating a custom field group to mange the content for say a Hero, features and services section, I create custom fields for the title and introduction text for each section. I may want to manage the content for a card using Meta Box that has the same content structure .i.e. title, text and image. Again I have to create custom fields for each section.

I see that you have a function called "array_merge()" Source which solves that problem. While I've never implemented this, I suspect it will take me more time writing code over a GUI.

I'm suggesting a reusable template custom field area where you create custom field groups that are not assigned. It's used as a blueprint to use on any post type or page and across websites.

So what I'm thinking is to add an option called existing custom field group when you select add field or a similar name. I'm thinking that it should always be nested within another field group to avoid conflict with another custom field group. You can then select which custom field group to reuse from a list and be searchable.

For the developers, would you like to see this feature as an extension or part of the core Meta Box?

Is there anything that I've missed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions