Closed (fixed)
Project:
Webform
Version:
5.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
17 Jan 2008 at 13:39 UTC
Updated:
15 Apr 2009 at 14:34 UTC
Hi,
I've tried searching for a solution but nothing immediately pops out.
History : Newbie with Drupal and the whole html/forms thing. Experienced c++/SQL programmer.
I create a webform, all seems fine. I hit the submit button and the data is stored in a proprietary webform table in my schema.
Is there any way I can intercept this save and ask the data to be saved elsewhere ?
Thanks
keith
Comments
Comment #1
quicksketchYou can inject any PHP code you'd like into the Additional submit box under the Advanced settings for a webform. If looking for what variables are available to you, paste this into the box and it'll tell you what variables you have available:
Comment #2
Keith Hurst commentedThanks for this,
I put the code in the Additional Processing box and the following appears...
[form_values] => Array
(
[submitted] => Array
(
[1200569718] => name - Full
[1200569749] => name - short
[1200569776] => Array
(
[month] => 2
[day] => 17
[year] => 2008
)
)
[details] => Array
(
[email_subject] => default
[email_from_name] => default
[email_from_address] => default
[nid] => 9
)
[op] => Submit
[submitbutton] => Submit
[form_token] => aafc1e23bb20876404d5b73aa7183656
[form_id] => webform_client_form_9
[submitted_tree] => Array
(
[pokernights_fullname] => name - Full
Plus some other stuff.
I'm interested in the last line shown [pokernights_fullname]. How can I access this directly ? I tried...
But it just bombs out.
Thanks
Keith
Comment #3
Keith Hurst commentedGot it - Thanks again.
Keith
Comment #4
quicksketchGreat!
Comment #5
guislutavo commentedThis doesnt work in my site... there is simply nothing in the screen when I fill the form and sumbmit it. I've written this in the Additional Processing box:
Then it shows the value in the 'submitted_tree' array and I can modify it. Also I can change the values in the 'submitted' array and send the confirmation e-mail with these new values, but I cannot show the content of the 'submitted' array, and I cannot change any submit value in the Data base. I've been searching for some help in this forum since a month ago and i've not found something... Someone could help me?
Comment #6
kriskhaira commentedWhen using submitted, you have to use the component ID which is a number you can get from the end of the URL when you edit the component.
Comment #7
kriskhaira commentedWhen using submitted, you have to use the component ID which is a number you can get from the end of the URL when you edit the component.