function civicrm_entity_contact_assign_rel_contact_field_contact_subtype_ajax_callback in CiviCRM Entity 7.2
Ajax callback for contact subtype options
_state
Parameters
$form:
Return value
mixed
1 string reference to 'civicrm_entity_contact_assign_rel_contact_field_contact_subtype_ajax_callback'
- civicrm_entity_contact_assign_rel_contact_field_field_settings_form in modules/
civicrm_entity_contact_assign_rel_contact_field/ civicrm_entity_contact_assign_rel_contact_field.module - Implements hook_field_settings_form().
File
- modules/
civicrm_entity_contact_assign_rel_contact_field/ civicrm_entity_contact_assign_rel_contact_field.module, line 176 - Provide CiviCRM Entity Contact Assign Relationship Contacts List Field Type. Provides a widget for adding/removing a contacts relationships to a list of contacts.
Code
function civicrm_entity_contact_assign_rel_contact_field_contact_subtype_ajax_callback(&$form, &$form_state) {
$contact_type = $form_state['values']['field']['settings']['contact_type'];
$contact_subtypes = _civicrm_entity_contact_assign_rel_contact_field_get_subtypes($contact_type);
$form['field']['settings']['contact_subtype']['#options'] = $contact_subtypes;
return $form['field']['settings']['contact_subtype'];
}