function _hs_process_determine_hsid in Hierarchical Select 7.3
1 call to _hs_process_determine_hsid()
- form_hierarchical_select_process in ./
hierarchical_select.module - Hierarchical select form element type #process callback.
File
- ./
hierarchical_select.module, line 364 - 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 _hs_process_determine_hsid($element, &$form_state) {
// Determine the HSID to use: either the existing one that is received, or
// generate a new one based on the last HSID used (which is
// stored in form state storage).
if (!isset($element['#value']) || !is_array($element['#value']) || !array_key_exists('hsid', $element['#value'])) {
$hsid = uniqid();
}
else {
$hsid = check_plain($element['#value']['hsid']);
}
return $hsid;
}