The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (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.27 (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.27 (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.27 (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.27 (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.27 (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 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
NOOB alert! Emailing a value after form submission - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: NOOB alert! Emailing a value after form submission (/showthread.php?tid=1674)



NOOB alert! Emailing a value after form submission - Kevin G - Oct 6th, 2011

Firstly I apologize, as I'm sure this is a simple thing, unfortunately I too, am simple!!

I have Form Tools 2.1 installed, my form created, form submissions are updating the db and everything is successful so far (a BIG thank you to the Form Tool developers, btw!!).

Now all I need to do is query a separate table in my db (to lookup a code), based on a value entered into my form, and email that code to the address entered into the form.

Is there an easy way to do this? Thank you in advance, I appreciate any help I can get!


RE: NOOB alert! Emailing a value after form submission - Ben - Oct 7th, 2011

Hi Kevin,

Welcome to the forums!

Interesting question. So you have a totally separate (non-Form Tools) database containing data that you need to interact with? Neat... is it on the same server as your Form Tools installation?

I'm afraid I don't have any easy solutions. To get it to all work within the Form Tools interface (which would be best, of course) you kind of need to write a separate module. I'd tackle it like this: create a module with a template hook to display a "find key" section on the form submissions page which when entered, would send an Ajax request to get back the info. You could then feed that into the form submission, update it, then use the email templates functionality to create a default email template targeted at the appropriate recipient & containing that data.

Sorry, that was pretty high level. But it's non-trivial.

Alternatively...

Do you need to do the lookup right before emailing? Instead, could you grab the data from your second database table when the original form submission is put through? If so, you could create some code in the Submission Pre-Parser module to run on the server and store the appropriate code in the Form Tools table for each submission, right from the start.

But I gotta be honest: this is all pretty complicated and you'll need a developer handy.

Sorry I couldn't be more help...!

- Ben




RE: NOOB alert! Emailing a value after form submission - Kevin G - Oct 8th, 2011

Hi Ben!

Thank you for your answer (and also for Form Tools!) I was thinking / hoping this would be a little easier than it now appears!

I don't have a second database however. My plan was to add an additional table into the existing FT database....maybe that's not the right way to go about it, but I thought that would be easier on me to do it that way! I think I'll try the alternative that you suggested...so if I can get the Submission Pre-Parser module to lookup and store the code into the Form Tools table, then it would be just a matter of having the email template send the appropriate placeholder field...if I'm understanding correctly. Of course I'm not sure if I am; I'm very new to this, and unfortunately there's no developer. sigh. Just me Undecided Hopefully I can figure out just enough to get by!

Thank you again for all your help!


RE: NOOB alert! Emailing a value after form submission - Ben - Oct 10th, 2011

Hi Kevin,

I wish I had some better news, but I don't have much to suggest! One of the modules I mean to work on is to allow mapping of data between one form to another, but it's not #1 on my list yet: I had a pile of contract work to get through, plus I need to release the upcoming Form Builder module.

Sorry about that - but good luck finding a solution...!

- Ben