The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Hooks Manager / Submission Pre-Parser - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16) +--- Thread: Hooks Manager / Submission Pre-Parser (/showthread.php?tid=824) |
Hooks Manager / Submission Pre-Parser - tombr - Aug 26th, 2010 Hi All, Hope someone can help with this. Scenario: I have a multipage (6 pages) entry form with paypal integration and all of this works perfectly. Page 5 contains the register button and page 6 has the thank you details. Problem: Now what I wanted todo is use either the Hooks Manager or the submission parser to hook into the form submission at the point where the user presses the Register button. At this point I need to write a text file onto the server that will update an entries page with registrants and a few other bits of information. Now the problem is I have not been able to find a hook that contains all of the submission data. The ft_get_form hook as well as the Submission Pre-Parser contain data only from the current page. Question: Is there a hook available that contains all of the data from a particular submission. Thanks in advance regards, tombr.... RE: Hooks Manager / Submission Pre-Parser - Ben - Aug 28th, 2010 Hi Tombr, Sure! The hooks are just for attaching your own code to a particular juncture in the code. What you really need is to call a core function within your Submission Pre-Parser (or Hooks Manager) rule to retrieve all the pertinent info. Probably what you want is this guy: ft_get_submission_info. If you call that function in your Submission Pre-Parser rule with the appropriate $form_id and $submission_id values, it will return a hash of database column names to values. Here's an example: PHP Code: $submission_info = ft_get_submission_info($form_id, $submission_id); Then put through a test submission. You should see the submission contents outputted to the screen. That should give you an idea of what info it contains and how to get at it. Once you're okay with it, just remove the print_r() and exit; Hope this helps! ![]() - Ben RE: Hooks Manager / Submission Pre-Parser - tombr - Aug 29th, 2010 (Aug 28th, 2010, 10:32 AM)Ben Wrote: Hi Tombr, Hi Ben Thanks for that I will test it out during the week. cheers, tombr.... |