The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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);
print_r($submission_info);
exit; 

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! Smile And good luck!

- Ben


RE: Hooks Manager / Submission Pre-Parser - tombr - Aug 29th, 2010

(Aug 28th, 2010, 10:32 AM)Ben Wrote: Hi Tombr,

Sure! The hooks are just for attaching your own code to a particular

...... cut .......

Hope this helps! Smile And good luck!

- Ben

Hi Ben

Thanks for that I will test it out during the week.

cheers,

tombr....