Closed niallobrien closed 5 years ago
Hi @niallobrien you'll have to modify the content-type-builder plugin and the content-manager plugins. In order to do so you have to start your project in development mode
Steps to display your new input in the content type builder
/plugins/content-type-builder/admin/src/containers/Form/forms.json
file. /plugins/content-type-builder/admin/src/translations
folderUse your new type in the content manager
Edit
container and its children in order to display your new field type.strapi-helper-plugin/src/components/Input/index.js
file or a new Input directly in your plugin's admin/src/components
folder and import it in the content-manager/admin/src/admin/components/EditForm/index.js
file.Adding a new type is not optimal at the moment you might have to modify the core of this two plugins.
Thanks for the info. Are there plans to make this process more modular in the future?
Well we're currently working on the upload, but since the Input Library has been redone it should be normally easier to create new types (for the front end part), you'll will just have to edit a json file if the GUI doesn't contain it already. However it's not on our short-term road map to allow to create custom field from the GUI šš..
Hi guys! I'm looking at Strapi cause I really need a new Headless CMS, I like a LOT of things I've seen in Strapi but this feature in particular would be essential and could be a game changer in the CMS scenario.
In particular, what I'd need is the "Location" field, a-la Contentful.
If this enhancement is difficult to implement (I believe so), could I ask if you could include a location field type soon? Thanks, and compliments!
I'm also considering to use Strapi but I don't feel confident using it without a feature to add custom field types...
This is a must.
@UserGalileo Did you find a solution for this or did you choose other CMS?
@Daekan I donāt need it right now, but Iām also looking at graphCMS which should implement that feature and itās GraphQL based :) Iām keeping an eye on both!
The great virtue of Strapi.io is that it is a completely open source CMS. This practically doesn't really exist in today's world, believe it or not. They all want to keep your stuff in the cloud behind a paywall and give you toys, like graphCMS, like contentful and others or else are oldish or directly abandoned, like Keystone. Strapi.io is open, I've just started using it and I'm amazed at how it creates my API automatically, including the basic code. You can even develop templates and use these from the command line generator. Also, the road is open to develop and make pull requests (I only hope I'll be able to do this in the future). So I don't think it's fair to compare something like graphCMS (completely behind a paywall) and a community driven open source project.
@victorkane GraphCMS is going open source this month with the beta release for testing and they are doing an awesome job to improve the platform :) You can look at what they're doing on the Slack channel.
So yeah, after they go open source, the comparison will be fair. Also, don't forget the services that Contentful (for example) gives you: the Sync API alone justifies the cost for me. And this is something totally managed, totally handled by their servers. They offer different services which live "behind that paywall" :)
@UserGalileo Unfortunately, the backend will remain closed (from their slack):
I remember that GraphCMS relies on GraphCool, so they can't open their backend. Also, it doesn't make sense for them to do that. Their business model hasn't been thought about a full open-source strategy in mind like we're doing...
Anyway.. +1 for custom fields. Mandatory feature.
+1 for custom fields. Mandatory feature.
+1 for this one. Would be open to assisting in implementation, am a bit new to Strapi however so some direction would be wonderful if possible.
+1 too
@bkd705 do you mean adding a new type of field in the content-type-builder or customising the content-manager with new fields?
@soupette IMHO any solution to make it easier to add custom fields to users would be great. Right now if I add an Image field to the user I have problems reading it back with the strapi-sdk in nuxt.
+1
+1
This feature will be implemented. Please upvote and give us more insights via Product Board (https://portal.productboard.com/strapi/c/10-custom-fields).
+1
@steampixel if you haven't already you can also send your support on the product board page as well :)
Hi @niallobrien you'll have to modify the content-type-builder plugin and the content-manager plugins. In order to do so you have to start your project in development mode
Steps to display your new input in the content type builder
- To display your new field you'll have to add it in the
/plugins/content-type-builder/admin/src/containers/Form/forms.json
file.- You'll have to add the corresponding translations in the
/plugins/content-type-builder/admin/src/translations
folder- From now on you're able to display your new attribute in the plugin (this might have an impact on the plugin's component)
- You won't have to modify the actions or reducer of the plugin's front-end part.
Use your new type in the content manager
- In the content manager plugin you'll have to modify the
Edit
container and its children in order to display your new field type.- You'll have to either create a new input type in the
strapi-helper-plugin/src/components/Input/index.js
file or a new Input directly in your plugin'sadmin/src/components
folder and import it in thecontent-manager/admin/src/admin/components/EditForm/index.js
file.Adding a new type is not optimal at the moment you might have to modify the core of this two plugins.
Hi,
I try your way but when, on the admin, I add the custom field and save, the server stopped.
There is the error: UnhandledPromiseRejectionWarning: TypeError: Invalid value for schema path Email.type
I look to where the schema is generated and I can't find it. I'm start strapi with MongoDB and looking to have custom field in Object format.
Thanks,
+1 need this so I can kill off wordpress + acf please š
So in fact currently it's not really possible to create custom content fields?
@ChristopherDosin possible yes. difficult also yes. deployment after creation? Very difficult. Upgradability on strapi versions and keeping modifications? near impossible at the moment.
@derrickmehaffy argh .. okay. Hopefully, those custom fields will come in the near future. Maybe we should start a fundraising for this incredibly useful feature? ^^
@ChristopherDosin the problem is not funds, it's lack of outside contributors. The Strapi team is quite busy working on other more important stuff right now. If someone else wanted to take up development of this they are welcome to submit a PR.
@derrickmehaffy Understand - I would if i could :) But i am not that Node.js / Strapi / JS Guru to submit such a PR .. :(
There are quite a number of other important feature requests as well: https://portal.productboard.com/strapi/tabs/2-under-consideration but I am in the same boat @ChristopherDosin
@ChristopherDosin This might be a long shot but... WordPress with the plugins: Advanced Custom Fields and ACF to Rest API. Then use the Rest API to grab data. Not sure how to pull api data to populate a custom strapi field though.
ACF (Advanced Custom Fields) provides all the functionality I would like to see in Strapis custom fields. Obviously its a different architecture and approach but ACF gets it right when it comes to fields. Its worked for every single client Ive served for the last 5 years doing WP dev. The Flexible Content
especially allows me to make any data model I need for content creators.
https://www.advancedcustomfields.com/
p.s. rant: This is the most important feature for me and my workflow. This would push Strapi beyond a "possible" solution for my clients, and actually become a viable, real solution that I can sell to business's. With that said I totally understand the team has obligations and more important structural features but without this I cant adopt strapi just yet but, Im hoping I can sooner than later :)
Cheers!
p.s. rant: This is the most important feature for me and my workflow. This would push Strapi beyond a "possible" solution for my clients, and actually become a viable, real solution that I can sell to business's. With that said I totally understand the team has obligations and more important structural features but without this I cant adopt strapi just yet but, Im hoping I can sooner than later :)
Trust me, lots of us have "deal breaking" bugs and features we want, hence why I would like to see other contributors with higher skills sets than myself help build the features they want. This is an open source project after all :wink: (I'm not a member of the Strapi team)
Will it possible to add a custom field type like "ValueWithUnit" with this future feature?
Currently I manage to do it in Strapi with JSON field:
{ "value": 14 "unit": "mm", }
and can filter it through GraphQL endpoint.
But it will be nice if we can have a custom filed type to display it properly in Content Manager screen. It's empty now:
Yes, we rewrote the plugin to accept custom field in the future. We don't support it for now but don't worry we have this feature in mind.
I see this is closed, was this feature added?
@dhniels It has not, if you see here: https://github.com/strapi/strapi/issues/483#issuecomment-437675592
It was moved over to the Feature Request tracking (ProductBoard)
Still not implemented?
Still not implemented?
No, but you can contribute if you have some good ideas how to get started š
Any tips?
Hi. I'm on laravel at the moment but thinking to learn node.js. I've found strapi today and it seems very promising but without custom form field types and custom list column types it's unusable for my projects.
Now I use October CMS for backend apps, it's based on laravel so I think it's not an option for you guys. It has all the feature you missing from strapi in this issue. I hope custom fields and list column types will be implemented.
@ChristopherDosin This might be a long shot but... WordPress with the plugins: Advanced Custom Fields and ACF to Rest API. Then use the Rest API to grab data. Not sure how to pull api data to populate a custom strapi field though.
ACF (Advanced Custom Fields) provides all the functionality I would like to see in Strapis custom fields. Obviously its a different architecture and approach but ACF gets it right when it comes to fields. Its worked for every single client Ive served for the last 5 years doing WP dev. The
Flexible Content
especially allows me to make any data model I need for content creators.https://www.advancedcustomfields.com/
p.s. rant: This is the most important feature for me and my workflow. This would push Strapi beyond a "possible" solution for my clients, and actually become a viable, real solution that I can sell to business's. With that said I totally understand the team has obligations and more important structural features but without this I cant adopt strapi just yet but, Im hoping I can sooner than later :)
Cheers!
Custom fields are the most important aspect of having better control over the app by adding multiple and different forms of content. I'm really not 100% into Strapi because of custom fields, I love to see this feature in the near future.
Hello, an update about this topic. This coming step by step.
"Currently, we have added this feature to the administration panel (documentation here) which is the first step to the adding custom fields to your project. It works great if you add them manually but the content-type-builder does not support it yet."
cc @soupette author of this quote.
@lauriejim Yeah, great news ! It really the killer feature i was expecting to switch to Strapi for my projects.
Thanks for all this work.
@lauriejim @soupette Really looking forward to this, Finally Strapi is coming to a stage which can be used for much more projects.
@lauriejim
Is it possible to create custom field based on existing fields like jsonfield? I wan't to create new type of field and assign it to my content types
Hello! It's not possible to create a new field, but your can update the JSON field that currently exist in Strapi to make it matches your need. Here is an example with the WYSIWYG input.
For the momentļ¼create new field by customized jsonfieldļ¼ is good idea!but it's limited ,a project can only have one custom field,i think may jsonfiled have an optional attribute,like 'subtype' or else,then our customize field can use this for show a different look
Is this still not possible? For example with a plugin? I try to create a plugin for a new type of field ,but it doesn't show up in the field selector.
Is this still not possible? For example with a plugin? I try to create a plugin for a new type of field ,but it doesn't show up in the field selector.
You can't currently inject new fields into the content-type builder but you can add custom fields manually. For example see: https://www.paulgaumer.com/blog/how-to-create-a-color-picker-plugin-for-strapi-cms
Just note that the columnType
needs to match a data type for your database. Attempting to modify a model with a custom field set manually through the .json config will throw errors and likely break the model.
I have try that tutorial but when I am using version 3.6.5 it won't work I think because this issue
in version 3.2.5 and this is work there is any help ?
Hi, I'd like to explore the possibility of creating new field types to further expand what's already within Strapi. How would I go about this?
Thanks in advance.
Node.js version: 8.9.0 npm version: 5.5.1 Strapi version: 3.0.0-alpha.6.7 Operating system: Windows 7 Enterprise