Answers.Body: <p>You can look at Craft's own <a href="http://buildwithcraft.com/classreference/controllers/InstallController" rel="nofollow">InstallController</a> and <a href="http://buildwithcraft.com/classreference/services/InstallService" rel="nofollow">InstallService</a> to see how Craft programmatically creates the default content you see during a fresh install.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-08T09:43:30.147Z
Answers.Text: Hi Brad - are there any simple working examples to get people started?
Answers.UserDisplayName: Alexander Holsgrove
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-31T21:03:14.623Z
Answers.LastActivityDate: 2014-08-31T21:03:14.623Z
Answers.UserDisplayName: Brad Bell
Body: <p>Anyone here who can provide a working sample of how to create several fields and groups using a plugin? It don't need to be fancy, nothing new, just re use the stuff thats built-in and it need to work somehow so I can extend it from there.</p>
  
  <p>Is there something to consider if I create for example some profile fields for the Users Group? Or lets say I want a job portal and have field set name "job profile" which contains fields for job description, location, skills, ...</p>
  
  <p>I feel a bit ashamed asking for such a comprehensive "task" but as I am not really a developer a lot things I am doing is hoping my try &amp; error attempts succeed (sometime). Having said that, I am a real pro in destroying any environment to the ground and finding bugs but I am also very experienced in installing and configuring servers and apps - guess why this is...</p>
  
  <p>This is the reason why I need to be able to create my playground as fast as possible and no, I don't want to copy/paste files, I want to learn extending the system.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-19T09:36:21.867Z
Comments.Text: I often make sites with 10-20 content blocks. I'd use Matrix field. For most of these fields I would have the same generic options, eg. dropdowns for bgcolor and textcolor options following the brand colors, padding top/bottom and mobile/desktop visibility. Making eg. 5 similar dropdowns across 20 blocks in the UI interface is not really a viable solution for me, and changing even the smallest details would be manual, slow and error prone. I was a little surprised that creating fields programmatically is not something Craft handles easily out of the box, given how extensive a system Craft is.
Comments.UserDisplayName: user2753446
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-19T20:09:21.740Z
Comments.Text: Hi there. This website isn't for Craft CMS feature requests, it's for folks in the community to help each other solve programming challenges. I'd recommend taking these questions to the Craft [Discord](https://craftcms.com/discord) channel if you'd like to discuss it further.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-20T00:38:32.647Z
Comments.Text: https://github.com/craftcms/cms/discussions is also a good place to discuss new feature requests in Craft.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-23T09:33:53.037Z
Comments.Text: Ah, ok. Thanks for recommendations. I've tried looking around for where to post suggestions, and it's not been very clear, so Thanks for pointing in the right direction.
  
  In the meantime, however, I think it's still good to have the topic covered here as well, so any further comments on-topic are most welcome. I'm curious as to whether there's more people out there with the same thoughts.
Comments.UserDisplayName: user2753446
Tags: <plugin-development><config>
Title: Creating fields programmatically / with PlugIn
ThreadText: # Creating fields programmatically / with PlugIn
  
  (Asked by: username_0 on 2014-08-31)
  
  Anyone here who can provide a working sample of how to create several fields and groups using a plugin? It don't need to be fancy, nothing new, just re use the stuff thats built-in and it need to work somehow so I can extend it from there.
  
  Is there something to consider if I create for example some profile fields for the Users Group? Or lets say I want a job portal and have field set name "job profile" which contains fields for job description, location, skills, ...
  
  I feel a bit ashamed asking for such a comprehensive "task" but as I am not really a developer a lot things I am doing is hoping my try & error attempts succeed (sometime). Having said that, I am a real pro in destroying any environment to the ground and finding bugs but I am also very experienced in installing and configuring servers and apps - guess why this is...
  
  This is the reason why I need to be able to create my playground as fast as possible and no, I don't want to copy/paste files, I want to learn extending the system.
  
  **Tags:** plugin-development, config
  
  > **Comments:**
  > **username_1**: I often make sites with 10-20 content blocks. I'd use Matrix field. For most of these fields I would have the same generic options, eg. dropdowns for bgcolor and textcolor options following the brand colors, padding top/bottom and mobile/desktop visibility. Making eg. 5 similar dropdowns across 20 blocks in the UI interface is not really a viable solution for me, and changing even the smallest details would be manual, slow and error prone. I was a little surprised that creating fields programmatically is not something Craft handles easily out of the box, given how extensive a system Craft is.  
  > **username_2**: Hi there. This website isn't for Craft CMS feature requests, it's for folks in the community to help each other solve programming challenges. I'd recommend taking these questions to the Craft [Discord](https://craftcms.com/discord) channel if you'd like to discuss it further.  
  > **username_3**: https://github.com/craftcms/cms/discussions is also a good place to discuss new feature requests in Craft.  
  > **username_1**: Ah, ok. Thanks for recommendations. I've tried looking around for where to post suggestions, and it's not been very clear, so Thanks for pointing in the right direction.  In the meantime, however, I think it's still good to have the topic covered here as well, so any further comments on-topic are most welcome. I'm curious as to whether there's more people out there with the same thoughts.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2014-08-31. Score: 3 | Accepted answer
  
  You can look at Craft's own [InstallController](http://buildwithcraft.com/classreference/controllers/InstallController) and [InstallService](http://buildwithcraft.com/classreference/services/InstallService) to see how Craft programmatically creates the default content you see during a fresh install.
  
  > **Comments:**
  > **username_4**: Hi username_3 - are there any simple working examples to get people started?  
  
  ---
  
  