<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>

CC BY-SA 3.0
2018-03-08T09:43:30.147Z
Hi Brad - are there any simple working examples to get people started?
Alexander Holsgrove
CC BY-SA 3.0
2014-08-31T21:03:14.623Z
2014-08-31T21:03:14.623Z
Brad Bell
<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>

CC BY-SA 4.0
2023-01-19T09:36:21.867Z
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.
user2753446
CC BY-SA 4.0
2023-01-19T20:09:21.740Z
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.
Lindsey D
CC BY-SA 4.0
2023-01-20T00:38:32.647Z
https://github.com/craftcms/cms/discussions is also a good place to discuss new feature requests in Craft.
Brad Bell
CC BY-SA 4.0
2023-01-23T09:33:53.037Z
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.
user2753446
<plugin-development><config>
Creating fields programmatically / with PlugIn
# 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 Brad - are there any simple working examples to get people started?  

---

