I'm trying to modify webform data (after update) with Rules. Using a php action with webform_get_submission() and webform_submission_update, I'm able to make my changes, but although the Rules events are "After" a webform has been submitted/updated, the submission data values I'm getting via $submission = webform_get_submission($node->nid, SUBMISSION_ID) are not reflecting what was just changed in the form, and are not the same as the rules $data array for the submitted webform, so when I do the programmatic update I lose uncommitted form updates. So the form isn't actually submitted at that point? Either that, or the "webform submission updated" hook is not using the correct data? It's horrifying to think about going through the $data array item by item to write current values into the $submission object and I would really appreciate not having that as my only option short of writing a module.
Thanks!
Comments
Comment #2
agerard commentedComment #3
agerard commentedComment #4
agerard commentedI think a small module might be the easiest solution, unless someone has a workaround within Webform Rules.