flynt-starter-theme icon indicating copy to clipboard operation
flynt-starter-theme copied to clipboard

Feature request: loading fields from one field group into another

Open emcarru opened this issue 7 years ago • 0 comments

I wanted to share some generic options across field groups and expected I would be able to do this, since it's possible already across components, features, and post types. Unfortunately, it doesn't look like this is possible yet?

Example:

In config/fieldGroups/pageOptions.json

{
  "name": "pageOptions",
  "title": "Page Options",
  "fields": [
    {
      "name": "specialPageOption",
      "label": "Special Page Option",
      "type": "true_false",
      "default_value": false,
      "ui": true
    },
    {
      "name": "moreOptions",
      "label": "Some more options...",
      "type": "text"
    }
  ],
  "location": [
    [
      {
        "param": "post_type",
        "operator": "==",
        "value": "page"
      }
    ]
  ]
}

In config/fieldGroups/postOptions.json, I would want to do this:

{
  "name": "postOptions",
  "title": "Post Options",
  "fields": [
    {
      "name": "customPostOption",
      "label": "Custom Post Option",
      "type": "text"
    }
    "Flynt/FieldGroups/PageOptions/Fields"
  ],
  "location": [
    [
      {
        "param": "post_type",
        "operator": "==",
        "value": "post"
      }
    ]
  ]
}

emcarru avatar May 07 '18 15:05 emcarru