Add field_tags on module install Is it possible to add the field field_tags in mymodule_install() like the body field?
I added a body field with node_add_body_field. I can see the field in field_config_instance table. Is there a posibility to add field_tags in hook_install() without doing it in the GUI?

Is it done by field_create_field?

if (!field_info_field('my_field')) {
  field_info_cache_clear();

  $field = array(
    'field_name' =&gt; 'my_field',
    'type' =&gt; 'custom_field_type',
    'cardinality' =&gt; 1
  );
  field_create_field($field);
}


But how to set the values for a default article or gui custom like tags field?
Yeah, i know according to strict forum rules it's not fine to answer your own question :-)
But anyway ...

I not realized, that the default fields are stored in table field_config and just a instance for a node in table field_config_instance.

I added the following lines to mymodule_install() of my module:

$instance = array(
  'field_name' =&gt; 'field_tags', 
  'entity_type' =&gt; 'node', 
  'label' =&gt; 'Tags',
  'bundle' =&gt; 'mynode',
  'widget' =&gt; array(
    'type' =&gt; 'textfield',
  ), 
);


I don't need field_create_field() because the field_tags already exists.

And i added a field to the custom node form:

function mymodule_node_form($form, &amp;$form_state, $node) {
...
   $form['field_tags'][LANGUAGE_NONE] = array(
       // '#entity_type' =&gt; 'node',
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Tags'),
       // '#autocomplete_path' =&gt; 'taxonomy/autocomplete/field_tags',
      '#field_name' =&gt; 'field_tags',
       // '#bundle' =&gt; 'mymodule',
      '#element_validate' =&gt; array(
                                 0 =&gt; 'taxonomy_autocomplete_validate',
                             ),
       //    '#after_build' =&gt; array(
       //                        0 =&gt; 'field_form_element_after_build', 
       //                      ),
      '#field_parents' =&gt; array(),
      '#language' =&gt; LANGUAGE_NONE,
      '#columns' =&gt; array(
                        0 =&gt; 'tid',
                    ),
      '#parents' =&gt; array(
                       0 =&gt; 'field_tags',
                       1 =&gt; LANGUAGE_NONE,
                    ),
   );
...
}


I tried to find out the obligate values. I'm not sure if it's wise to add more values?! I just realized that some values are not nescessary (the commented ones).