I created a custom module for Drupal 8 that allows the users to choose a Content type in order to add some fields programmatically. How I can create some fields (text type in this case) and attach they to a Content type with a custom module?
Some help?
Thanks.
You need to create FieldType, FieldWidget and FieldFormatter(If necessary), there are good examples in Core/Field/Plugin/Field.
There is a good example here https://www.drupal.org/node/2620964