(Dec 6th, 2011, 10:35 AM)Ben Wrote: Hi Carpetman,
Cool! No problem, here's how you can trigger it manually.
The emails are "normally" triggered in the ft_finalize_submission() function, called when the submission is finally marked as complete & ready to show up in the interface. But in your case, you can just call the email function manually. Here's some example code:
PHP Code:// your insert code here
mysql_query(" ... ");
// get the unique Submission ID that you just inserted
$submission_id = mysql_insert_id();
// now send whatever emails are associated with this event ("on submission") for this form
$form_id = 1; // you'll need to update this for your own form ID
ft_send_emails("on_submission", $form_id, $submission_id);
Hope this helps!
- Ben
Hi Ben,
I added this to a test page:
include("formtools/global/code/emails.php");
include("formtools/global/code/hooks.php");
include("formtools/global/code/fields.php");
ft_process_email_template('1','1007','23');
and i'm getting this errror:
Access denied for user 'carpetc7'@'localhost' (using password: NO)
Any chance of putting me in the right direction? I'm guessing the formtools code is querying mysql and doesnt have the password because i havent logged in.
Thanks
Rob
Oops - forget that - i know what i'm missing. I am getting error after error but i'm working through them. I may need a bit of help if i get stuck though

ok i got this error now
Table 'carpetc7_formtools.form_fields' doesn't exist
i checked mysql and i have table ft_form_fields but its looking for form_fields
any ideas