You are here

function civicrm_entity_profile_field_instance_settings_form in CiviCRM Entity 7.2

Implements hook_field_settings_form().

Parameters

$field:

$instance:

Return value

array

File

modules/civicrm_entity_profile/civicrm_entity_profile.module, line 206

Code

function civicrm_entity_profile_field_instance_settings_form($field, $instance) {
  if ($instance['entity_type'] == 'civicrm_event') {
    $settings = $instance['settings'];
    $form['registrant_type'] = array(
      '#type' => 'select',
      '#multiple' => FALSE,
      '#title' => t('Registrant Type'),
      '#default_value' => !empty($settings['registrant_type']) ? $settings['registrant_type'] : 'CiviEvent',
      '#description' => t('Groups to include for this field '),
      '#options' => array(
        'CiviEvent' => 'Main Registrant',
        'CiviEvent_Additional' => 'Additional Participant',
      ),
    );
    return $form;
  }
}