FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OnSubmission Email
#1
I had problem sending auto notification when someone submits a form. But then I found this code:
PHP Code:
if ($passes_captcha && !empty($next_page) && !$is_deleting_file)
  {
    
// if the user wasn't putting through a test submission or initializing the form, we can send safely
    // send emails at this juncture, but ONLY if it was just finalized OR if the send_emails parameter
    // allows for it
    
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"])
      && !isset(
$form_data["form_tools_ignore_submission"]))
    {
      
// send any emails attached to the on_submission trigger
      
if (isset($params["send_emails"]) && $params["send_emails"] === true)
          
ft_send_emails("on_submission"$form_id$submission_id);
      else if (
$is_finalized == "yes" && (!isset($params["send_emails"]) || $params["send_emails"] !== false))
        
ft_send_emails("on_submission"$form_id$submission_id);
    }

    
header("location: $next_page");
    exit;
  } 

Does it mean that I can only receive emails when I have CAPTCHA and $next_page specified?
Reply
#2
Hi SibuNY,

Yes, there needs to be a "next_page" param specified, but no, there doesn't have to be a captcha ($passes_captcha defaults to true).

Do you have a situation where you don't want to define a $next_page?

- Ben
Reply
#3
Sorry for long delay Smile

For some reason, notification email didn't work when I specified $next_page parameter. So the solution was not to specify it, and then use header("Location: thankyou.php") to redirect to a thank you page.

I'll try to find some time and play around to see why it wouldn't work.

Max

(Nov 20th, 2010, 10:06 AM)Ben Wrote: Hi SibuNY,

Yes, there needs to be a "next_page" param specified, but no, there doesn't have to be a captcha ($passes_captcha defaults to true).

Do you have a situation where you don't want to define a $next_page?

- Ben

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)