Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

westonganger
Copy link
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
Contributor Author

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

@did
Copy link
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