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 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (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.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
Trouble with thankyou.php and email confirmation. - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: Trouble with thankyou.php and email confirmation. (/showthread.php?tid=4596)



Trouble with thankyou.php and email confirmation. - anrozier1925 - Sep 9th, 2014

Hello,

I am having with my form submitting, but not directing to the thank you page, nor generating an email.

Here is the beginning code for the actual form:

<?php
require_once("../formtools/global/api/api.php");
/*Place initiation code here*/
$fields = ft_api_init_form_page(57);

$errors = array();
if (isset($_POST['submit']))
{
$rules = array();
$rules[] = "required,name,Please enter your full name.";
$rules[] = "required,phone,Please enter your phone number.";
$rules[] = "reg_exp,phone,^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$,Please enter a valid phone number.";
$rules[] = "required,email,Please enter an email address.";
$rules[] = "valid_email,email,Please enter a valid email address.";
$rules[] = "required,street,Please enter your street address.";
$rules[] = "required,city,Please enter your city.";
$rules[] = "required,state,Please enter your state.";
$rules[] = "required,zip,Please enter your zip code.";
$rules[] = "length=5,zip,Enter a 5 digit zip code.";
$rules[] = "digits_only,zip,Use only numbers for the zip code.";
$errors = validate_fields($_POST, $rules);

$params = array(
"submit_button" => "submit",
"next_page" => "extsvsthankyou.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
}


Here is the beginning of the code for the thankyou.php page:

<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(57);
ft_api_clear_form_sessions(57);
?>

I have changed the "../formtools/global/api/api.php" to the full file name, and it generated an error. The form does submit, and I am able to see it, but the thank you page does not generate.

When I manually type in the url for the thank you page, it does generate the fields for the submitted form.

Please advise on what errors I should fix. I am using version 2.0.4 (will update soon).

-Nikki