Only the $sid is available in hook_webform_draft_alter. For the module developer to modify the $sid, additional context would be helpful -- specifically the webform node id and the user id (even though this is global, it might not be in some future version).
A context array of the form is now passed:
$context = array(
'nid' => $nid,
'uid' => $uid,
);
drupal_alter('webform_draft', $sid, $context);
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform-webform_draft_context-2302029-1.patch | 1.03 KB | danchadwick |
Comments
Comment #1
danchadwick commentedCommitted to 7.x-4.x and 8.x.
This is a backward-compatible API change.