Skip to content
Snippets Groups Projects
Commit d9eac32c authored by Stefan Borchert's avatar Stefan Borchert
Browse files

Issue #1700354: change components value structure to respect changes in Webform 7.x-4.x.


Signed-off-by: default avatarStefan Borchert <stefan.borchert@undpaul.de>
parent ca30fc16
No related branches found
No related tags found
No related merge requests found
......@@ -4,5 +4,5 @@ description = "Adds rules integration for webform submissions."
package = Webform
files[] = webform_rules.module
files[] = webform_rules.rules.inc
dependencies[] = webform
dependencies[] = webform (>=7.x-4.x)
dependencies[] = rules
......@@ -81,7 +81,7 @@ function webform_rules_client_form_submit($form, &$form_state) {
// Map submitted data to submission data.
foreach ($form_state['values']['submitted'] as $cid => $value) {
if (isset($submission->data[$cid])) {
$submission->data[$cid]['value'] = $value;
$submission->data[$cid] = $value;
}
}
// Invoke event.
......@@ -115,7 +115,7 @@ function webform_rules_rules_invoke_event($submission, $node, $op = 'insert') {
// Map values to field names.
foreach ($submission->data as $cid => $value) {
$component = $webform['components'][$cid];
$data['components'][$component['form_key']]['value'] = $value['value'];
$data['components'][$component['form_key']]['value'] = $value;
$data['components'][$component['form_key']]['component'] = $component;
}
// Invoke the rules event.
......@@ -319,5 +319,8 @@ function webform_rules_render_component($component, $value, $format = 'text', $t
if (!$title) {
$display_element['#title'] = NULL;
}
if (!isset($display_element['#webform_component'])) {
$display_element['#webform_component'] = $component;
}
return drupal_render($display_element);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment