function civicrm_entity_contact_group_assign_field_field_formatter_settings_form in CiviCRM Entity 7.2
Implements hook_field_formatter_settings_form().
_state
Parameters
$field:
$instance:
$view_mode:
$form:
Return value
array
File
- modules/
civicrm_entity_contact_group_assign_field/ civicrm_entity_contact_group_assign_field.module, line 307 - Provide CiviCRM Entity Contact Group Assign Field Type. Provides a widget for adding/removing a contact to a selected list of groups.
Code
function civicrm_entity_contact_group_assign_field_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
if ($field['type'] == 'civicrm_entity_contact_group_assign_field') {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$element = array();
$element['link_to_groups'] = array(
'#type' => 'checkbox',
'#title' => t('Output groups as links to entities'),
'#default_value' => isset($settings['link_to_groups']) ? $settings['link_to_groups'] : 0,
'#return_value' => 1,
);
return $element;
}
}