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
Comment #1
quicksketchThis 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).
Comment #2
jruberto commentedbut of course! thanks so much.
cheers,
j