I'm programatically creating a node in the additional processing field. I've tried doing it using drupal_execute() and node_save() methods. The node is created successfully, but then after webform submission the user is redirected to /node/n/done?sid=s where n is the new node id and s is the webform submission sid. Similar behavior using drupal_execute().

Any insight on a way to prevent this unwanted redirection & continue with processing my "confirmation message or redirect URL" block would be incredibly helpful to me. Thanks! ~j

Comments

quicksketch’s picture

This is because the $node variable is in the local scope when you're doing your additional processing. When you create your new node, give it a different variable name like $new_node. If you change any of the values of $node, you're actually changing the webform node itself (though this $node object is never saved on submission, otherwise you would've done some pretty good damage to your webform node).

jruberto’s picture

Status: Active » Closed (fixed)

but of course! thanks so much.

cheers,
j