function _eloqua_get_submission_data in Eloqua 6
Same name and namespace in other branches
- 7 eloqua_webform/eloqua_webform.cron.inc \_eloqua_get_submission_data()
Handle translating our post values into what eloqua wants in terms of structure.
Dates are by default handled in YYYY-mm-dd Times are by default handled in HH:mm
Parameters
$tree - the post tree name => value pairs:
$posted_values - the post tree, could be name => value pairs or index => value pairs:
$result - the re-structured tree that Eloqua will leverage:
Return value
none
1 call to _eloqua_get_submission_data()
- _eloqua_cron_get_post_fields in ./
eloqua.cron.inc - Returns the post fields for the request, modified for eloqua
File
- ./
eloqua.cron.inc, line 173
Code
function _eloqua_get_submission_data($tree, $posted_values, &$result) {
foreach ($tree as $name => $value) {
// we need to expand things in fieldsets
if (is_array($value) && !in_array($value, $posted_values)) {
_eloqua_get_submission_data($value, $posted_values, $result);
}
else {
if (is_array($value)) {
$result[$name] = implode(',', $value);
}
else {
$result[$name] = $value;
}
}
}
}