The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Calling a php script when form is submitted - 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: Calling a php script when form is submitted (/showthread.php?tid=17409) Pages:
1
2
|
Calling a php script when form is submitted - Fazzax - Nov 16th, 2016 Hi! I'm willing to have a script started when the user submit his form. The php code is in a separate file I'd like to call, and uses many other librairies and variables from the form. I can't get it done. I've looked through the hook manager module, but I can't have it work properly... Any ideas? Thanks for the help! RE: Calling a php script when form is submitted - alexh - Nov 16th, 2016 Is this for an internal form or an external form? RE: Calling a php script when form is submitted - Fazzax - Nov 16th, 2016 It's for an external form RE: Calling a php script when form is submitted - alexh - Nov 16th, 2016 For an external form, the easiest way i have found is tois to call it in the thank you page. What kind of script are you running on submit? RE: Calling a php script when form is submitted - Fazzax - Nov 16th, 2016 Thanks for the reply. I'm pretty new in using formtools. Do you mean directly inserting the script in "publish/THANKYOU PAGE CONTENT" (form builder module)? It's this kind of script (month being a $ of the form): Code: <?php I wanted to attach the file created directly with the email sent RE: Calling a php script when form is submitted - alexh - Nov 16th, 2016 Ahh gotcha, I always forget about the formbuilder module. I would have to do some research on how that works, I've never used it. I know it has some reduced flexibility when it comes to stuff like this. If I have time tonight I'll take a look and see if there's an easy way to do it. Check out http://modules.formtools.org/form_builder/?page=tt_thankyou_page You may be able to insert it in the template there. RE: Calling a php script when form is submitted - Fazzax - Nov 16th, 2016 Ok thanks! couldn't find where/which template I should insert it in... Do you have any ideas? RE: Calling a php script when form is submitted - alexh - Nov 16th, 2016 http://modules.formtools.org/form_builder/?page=tips_targeting_specific_form_page I'm not in front of my computer but this should help. Let me know if you can't find it. RE: Calling a php script when form is submitted - Fazzax - Nov 16th, 2016 Yep found it! Thanks! Looks like I need to add {{ and }} to every line to get it interpreted, right? RE: Calling a php script when form is submitted - alexh - Nov 16th, 2016 I'm not sure. I really need to play with formbuilder so I can help answer some of these questions! |