1

I have a module that I'm working on that used the code:

  if (module_exists('fieldgroup')) {
    foreach ($content_types as $type) {
      fieldgroup_save_group($type, array('group_type' => 'standard', 'group_name' => "{$type}_group", 'label' => t("@type information", array("@type" => ucwords(str_replace("_", " ", $type)))), 'settings' => array(), 'weight' => -2));
    }
  }

$crc_field = array(
  'field_name' => "{$type}_crc32",
  'type_name' => $type,
  'label' => t('CRC32 hash'),
  'type' => 'text',
  'widget_type' => 'text_textfield',
  'group' => "{$type}_group",
);

This is in the .install file. What would be the appropriate method to use the D7 fieldgroup module to add an entity's fields to a fieldgroup. Is that no longer done in .install?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.