You are here

function _hierarchical_select_store_name in Hierarchical Select 5.3

Same name and namespace in other branches
  1. 6.3 hierarchical_select.module \_hierarchical_select_store_name()

Store the #name property of the given form item, so we can retrieve a list of #name properties of hierarchical_select form items present in this form later.

Parameters

$form_item: Optional. A hierarchical_select form item.

$hsid: Optional. A hierarchical select ID.

$reset: Optional. Flag that marks if the stored #name properties should be reset.

Return value

The stored #name properties per hierarchical_select form item.

2 calls to _hierarchical_select_store_name()
hierarchical_select_after_build in ./hierarchical_select.module
Hierarchical select form element type #after_build callback.
hierarchical_select_process in ./hierarchical_select.module
Hierarchical select form element type #process callback.

File

./hierarchical_select.module, line 1423
This module defines the "hierarchical_select" form element, which is a greatly enhanced way for letting the user select items in a hierarchy.

Code

function _hierarchical_select_store_name($form_item = NULL, $hsid = NULL, $reset = FALSE) {
  static $names;
  if ($reset) {
    $ret = $names;
    $names = array();
    return $ret;
  }
  if (isset($form_item) && isset($hsid)) {
    $names[$hsid] = $form_item['#name'];
  }
  return $names;
}