I have a need to be able to submit a webform on behalf of another user. Currently the webform_client_form_submit function hard codes the submission ID to the currently logged in user. I would like to add the ability to provide my own user account within FAPI that will give me the ability to change the submitter...

Really all I need is what the following patch shows.

Thanks,

Travis.

Comments

travist’s picture

Here is the patch.

vernond’s picture

I doubt that this is a sufficiently general requirement to warrant patching Webform. You could achieve the same thing by implementing hook_webform_submission_presave in a custom module (see webform_hooks.php in your webform directory).

quicksketch’s picture

Status: Active » Closed (won't fix)

This should be merged with the request at #292013: Change submission date and user.

As an API-only addition, I agree with @vernond that you can already do this through hook_webform_submission_presave(). I'd recommend that approach until Webform includes built-in functionality for this.

flightrisk’s picture

Is there a chance this will be included in a Webform update? I really need this. I am also looking into this as a temporary workaround: http://drupal.org/node/292013#comment-6423716, but it is currently useless to me since it only works with Drupal 6.