function _wfm_submission_data_expand_parents in Webform Multiple (WFM) 7
Add information to wfm_data containing the delta count of parent components.
1 call to _wfm_submission_data_expand_parents()
- _wfm_process_submission in ./
wfm.module - Process a submission to expand data from multiple-value components.
File
- ./
wfm.module, line 632 - Main module file for Webform Multiple (WFM).
Code
function _wfm_submission_data_expand_parents(&$wfm_data, $data) {
foreach ($data as $cid => $value) {
foreach ($value as $key => $sub_value) {
if (strpos($key, '|') !== FALSE && strpos($key, '#') !== FALSE) {
$key_components = explode('|', $key);
foreach ($key_components as $part) {
if (strpos($part, '#') !== FALSE) {
list($pid, $delta) = explode('#', $part);
if (!isset($data[$pid]) && !isset($wfm_data[$pid][$delta])) {
$wfm_data[$pid][$delta] = $delta;
}
}
}
}
}
}
}