You are here

function shs_entityreference_field_settings_process in Simple hierarchical select 7

Additional processing function for the entityreference field settings form.

Parameters

array $form: Form structure to process.

array $form_state: Current form state.

Return value

array Processed form structure.

2 string references to 'shs_entityreference_field_settings_process'
shs_form_field_ui_field_edit_form_alter in ./shs.module
Implements hook_form_FORM_ID_alter().
shs_form_field_ui_field_settings_form_alter in ./shs.module
Implements hook_form_FORM_ID_alter().

File

./shs.module, line 347
Provides an additional widget for term fields to create hierarchical selects.

Code

function shs_entityreference_field_settings_process(array $form, array $form_state) {
  if (!empty($form['target_type'])) {

    // Reduce list of available target types to taxonomy terms.
    $form['target_type']['#options'] = array(
      'taxonomy_term' => t('Taxonomy term'),
    );
  }
  return $form;
}