Hello,

I noticed a problem when creating a Webform having questions before and after a page break and having selected the option: Webform -> Form settings -> Advanced Settings -> Automatically save as draft between pages.

The resulting $data array to be used in rules, will only contain the answers before the page break and will omit the answers after the page break.

Kind regards.

Comments

stborchert’s picture

Unfortunately Webform is not including all the components within the submission object when using this setting.
There are 2 possibilities:
1.) file a request directly against Webform (I tend to say webform_submission_data() does not return all data ...)
2.) try to include the values of all submitted components instead of only those listed in $submission->data

The latter could be done by changing line 83 of webform_rules.module to this:

<?php
if (isset($submission->data[$cid]) || ($form_state['webform']['page_count'] > 1 && $form['#node']->webform['auto_save'])) {
?>

Could you please try if this works for you on your specific form and on other webforms?

mvochten’s picture

The suggested change of line 83 of webform_rules.module seems to have solved the problem for all my forms.

Thanks!

stborchert’s picture

Status: Active » Fixed

Fixed for this specific case.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.