You are here

function hs_taxonomy_hierarchical_select_update_form_item in Hierarchical Select 5.3

Update a taxonomy select to become a hierarchical_select type form item.

Parameters

$form_item: The form item to update.

$vid: The id of the vocabulary of which the configuration should be applied.

1 call to hs_taxonomy_hierarchical_select_update_form_item()
hs_taxonomy_form_alter in modules/hs_taxonomy.module
Implementation of hook_form_alter().

File

modules/hs_taxonomy.module, line 687
Implementation of the Hierarchical Select API for the Taxonomy module.

Code

function hs_taxonomy_hierarchical_select_update_form_item(&$form_item, $vid) {
  unset($form_item['#options']);

  // Unset to prevent passing around of possibly huge HTML.
  unset($form_item['#theme']);

  // Unset to prevent theme_taxonomy_term_select() from running.
  hierarchical_select_common_config_apply($form_item, "taxonomy-{$vid}");
}