Skip to content

[WIP] Add Support for pre-defined Custom Field Types#151

Open
westonganger wants to merge 1 commit intolocomotivecms:masterfrom
westonganger:custom_field_types
Open

[WIP] Add Support for pre-defined Custom Field Types#151
westonganger wants to merge 1 commit intolocomotivecms:masterfrom
westonganger:custom_field_types

Conversation

@westonganger
Copy link
Copy Markdown
Contributor

@westonganger westonganger commented Jul 10, 2019

Solves feature request within locomotivecms/engine#1277 (comment)

Custom field types are defined as .json files within config/custom_field_types/

Example Usage:

// config/custom_field_types/color_selector.json

{
  "type": "select",
  "options": [
    {"label": "Pink - #e69798","value": "bg-pink"},
    {"label": "Yellow - #f3c577", "value": "bg-yellow"}
  ]
}
// within the section definition

"settings": [
  {
    "type": "color_selector",
    "id": "background_color",
    "label": "Background Color"
  }
]

TBD:

  • Deploy fails for Content Type which utilize a custom field type
    • Resource invalid: entries_custom_fields is invalid, #5d00127ee1382349794fe075: Type is not included in the list
  • Section & Site Metafields editors fail to load when custom field type is used

I will be needing some assistance to complete this feature as so far I am only familiar with the Filesystem adapters.

Please feel free to refractor as necessary.

Related PR's:

@westonganger westonganger changed the title [WIP] Add Support for pre-defined Custom Setting Types [WIP] Add Support for pre-defined Custom Field Types Jul 10, 2019
@westonganger
Copy link
Copy Markdown
Contributor Author

Please place this functionality on high priority. This is much needed.

@did
Copy link
Copy Markdown
Member

did commented Jul 19, 2019

@westonganger let's talk about it on Gitter!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants