enable field groups programmatically I have created a field groups programmatically using this code:

in *.module file



/**
 * Implements hook_ctools_plugin_api()
 */
 function field_test_module3_ctools_plugin_api($module, $api) {

      if ($module == 'field_group' &amp;&amp; $api == 'field_group') {
        return array('version' =&gt; 1);
  }
}




in *.field_group.inc

/**
 * Implements hook_field_group_info()
 */

function field_test_module3_field_group_info(){

 $field_groups = array();
 $field_group = new stdClass();
 $field_group-&gt;disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
 $field_group-&gt;api_version = 1;
 $field_group-&gt;identifier = 'generale|node|field_esempio3|form';
 $field_group-&gt;group_name = 'generale';
 $field_group-&gt;entity_type = 'node';
 $field_group-&gt;bundle = 'field_esempio3';
 $field_group-&gt;mode = 'form';
 $field_group-&gt;parent_name = '';
 $field_group-&gt;data = array(
   'label' =&gt; 'Generale',
   'weight' =&gt; '2',
   'children' =&gt; array(
     0 =&gt; 'coverage',
   ),
   'format_type' =&gt; 'fieldset',
   'format_settings' =&gt; array(
     'formatter' =&gt; 'collapsed', //collapsible
     'instance_settings' =&gt; array(
       'description' =&gt; 'provo a creare un field group',
       'classes' =&gt; '', //generale field-group-fieldset
       'required_fields' =&gt; 1,
     ),
   ),
 );
 $field_groups['generale|node|field_esempio3|form'] = $field_group;

 return $field_groups; 
}


===================================================

Field groups is created but not dysplayed.
Bottom of the page there is a section "Disabled fieldgroups" where it appears



If it's enable there are no problem but I need that fieldgroups is activated automatically.
There is a way to enable this fieldgroups programatically?

Thank you.
You can use the following code.

foreach($field_groups as $field_group){
    ctools_export_crud_enable('field_group',$field_group-&gt;identifier);
}