I'm trying to pull in all field data from the validation action I'm running. See below for my code, I don't think it's entirely right - any input? Also it doesn't pull in uploaded file information either.
if (!isset($validation['form']) && isset($validation['fields']))
$fields = $validation['fields'];
else
$fields = $validation['form']['fields'];
$entry = array();
foreach ($fields as $field) {
$value = RGFormsModel::get_field_value($field);
if (is_array($value))
$value = implode('|', $value);
$entry[$field['id']] = $value;
}