The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
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 |