Closed (outdated)
Project:
Webform Rules
Version:
7.x-1.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2018 at 14:31 UTC
Updated:
2 Feb 2022 at 17:28 UTC
Jump to comment: Most recent
Comments
Comment #2
chuck_theobald commentedI've managed to get a new unsubmit function installed and triggering from a webform rule. I'm still working out how to get the submission id, which is a kind of chicken-and-egg thing. My first issue, though, is actually saving to the database.
I've got the following function modeled after webform_rules_submissions_load:
As you can see, I am working around the sid thing with a hard-coded sid. Also, dpm() confirms that the $submission object is being updated. Still, the above fails to update the submission in the database. The log shows warnings and notices about an undefined index 'webform' at lines 213 and 216 of webform_rules.module, along with the accompanying message about parameter 1 to array_keys().
I would not think that these would prevent updating the submission record, but it is still showing up as completed rather than draft. The rule does not reference any selector associated with webform, just referring to node:nid. Any advice or hints would be appreciated.
Comment #3
chuck_theobald commented