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
Thank you page redirect
#1
I have a single page form that was working just fine until I was getting some unwanted traffic and decided to add the reCaptcha feature to it. I got the Captcha feature to work with no problems; however, in trying to get the default error code to come up and the form to render all inputted information automatically, not only will the error message not appear (form is rendering info just fine) but now the form does not redirect to the "thank you" page when the Captcha is entered correctly. When the Captcha is entered correctly, I get a blank white page with the url address in the address bar listing my form page url. I have gone through various keywords in your forums and have read over 25 pages of related threads trying to find an answer but to no avail. I had your email template on the form and deactivated it with no improvement and even reinstalled the form from scatch through the Formtools administation page (as if a new form) and still the same thing happens. Just for the record when going though the re-initializing form process, there was no problem or errors in doing so. Currently I am using version 2.2.6. The following is the code on the form page with Formtool code in orange (exception - drop down box is not marked but has Formtool code in it):


<?php

require_once("/home2/scottfam/public_html/babybraceletsandsuch.com/formtools/global/api/api.php");
$fields = ft_api_init_form_page(4);
$params = array(
"submit_button" => "contact",
"next_page" => "../Documents/yescontactsub.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);

?>


<!DOCTYPE html>

<html>

<head>

<script type='text/javascript' src='/Scripts/commentBox.js'></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

<link rel='stylesheet' href='/CSS/sitePage.css'>

</head>

<body>

<?php

$faq = "F.A.Q.'s";

?>


<div id='div1' name='div1' class='header' style="text-align:center; border-bottom:2px solid #00ffff">


<!---------- PAGE HEADER ---------->


<div id='div2' name='div2'>

<p style="font-family:hancock, arial, san-serif; font-size:36pt; color:#00ffff; margin-bottom:-10px">
Baby Bracelets And Such
</p>

<p style="font-family:hancock, arial, san-serif; font-size:18pt; color:#00ffff">
Handmade Vintage-style Hospital Baby I.D. Bracelets and Other Handmade Items
</p>

<hr class='line'>

</div>

<div id='div3' name='div3'>

<ul id='nav' name='nav' style="width:70%">

<li class='nav'><a href='/homepage.php'><span style="line-height:30px; vertical-align:middle">Home</span></a></li>
<li class='nav'><a href='/Documents/bracelethomepage.php'>Baby<br>Bracelets</a></li>
<li class='nv1'><a href='/Documents/beadsandcolors.php'>Available Types<br>Beads & Colors</a></li>
<li class='nv1'><a href='/Forms/orderredirect.php'>Order Forms &<br>Gift Certificates</a></li>
<li class='nav'><a href= '/Documents/faq.php'><span style="line-height:30px; vertical-align:middle"><?php echo
$faq; ?></span></a></li>
<li class='nv2'><a href='/Documents/comments.php'>Testimonials<br>Commentaries</a></li>
<li class='nav'><a href='/Documents/policy.php'>Terms &<br>Policies</a></li>

</ul>

</div>

<div id='clear' name='clear' class='clear'>
<!----- This div is needed for the css/js functions to work correctly. ----->
</div>

</div>


<div id='div4' name='div4' class='content'>


<!---------- PAGE CONTENT ---------->


<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method='POST'>


<?php

$error = '<div class="error">Error! Please re-enter!!</div>';
ft_api_display_post_form_captcha_error($error);

?>


<div id='div5' name='div5' class='head'>

<p class='header1'>Contact Us</p>

<div id='div6' name='div6' style="margin-top:36px">

<div id='div7' name='div7'>

<p style="margin-left:250px; display:inline">First Name :
<span style="margin-left:100px; display:inline">Last Name :</span>
</p>

</div>

<div id='div8' name='div8'>

<input type='text' id='fname' name='fname' value="<?=@$fields["fname"]?>" style="margin-left:250px; display:inline">
<input type='text' id='lname' name='lname' value="<?=@$fields["lname"]?>" style="margin-left:30px; display:inline">

</div>

</div>

<div id='div9' name='div9' style="margin-top:20px">

<div id='div10' name='div10'>

<p style="margin-left:250px; display:inline">Address :</p>

</div>

<div id='div11' name='div11'>

<input type='text' id='address' name='address' value="<?=@$fields["address"]?>" style="margin-left:250px; width:360px">

</div>

</div>

<div id='div12' name='div12' style="margin-top:20px">

<div id='div13' name='div13'>

<p style="margin-left:250px; display:inline">City :
<span style="margin-left:150px; display:inline">State :</span>
<span style="margin-left:190px; display:inline">Zip Code :</span>
</p>

</div>

<div id='div14' name='div14'>

<input type='text' id='city' name='city' value="<?=@$fields["city"]?>" style="margin-left:250px; display:inline">

<div id='statelist' name='statelist' style="margin-left:30px; display:inline">

<select id='state' name='state' size='1'>

<option selected='selected' value=""></option>
<option value="AL" <?php if (@in_array("AL", $fields["state"])) echo "selected"; ?>>Alabama</option>
<option value="AK" <?php if (@in_array("AK", $fields["state"])) echo "selected"; ?>>Alaska</option>
<option value="AZ" <?php if (@in_array("AZ", $fields["state"])) echo "selected"; ?>>Arizona</option>
<option value="AR" <?php if (@in_array("AR", $fields["state"])) echo "selected"; ?>>Arkansas</option>
<option value="CA" <?php if (@in_array("CA", $fields["state"])) echo "selected"; ?>>California</option>
<option value="CO" <?php if (@in_array("CO", $fields["state"])) echo "selected"; ?>>Colorado</option>
<option value="CT" <?php if (@in_array("CT", $fields["state"])) echo "selected"; ?>>Connecticut</option>
<option value="DE" <?php if (@in_array("DE", $fields["state"])) echo "selected"; ?>>Delaware</option>
<option value="DC" <?php if (@in_array("DC", $fields["state"])) echo "selected"; ?>>District of Columbia (D.C.)</option>
<option value="FL" <?php if (@in_array("FL", $fields["state"])) echo "selected"; ?>>Florida</option>
<option value="GA" <?php if (@in_array("GA", $fields["state"])) echo "selected"; ?>>Georgia</option>
<option value="HI" <?php if (@in_array("HI", $fields["state"])) echo "selected"; ?>>Hawaii</option>
<option value="ID" <?php if (@in_array("ID", $fields["state"])) echo "selected"; ?>>Idaho</option>
<option value="IL" <?php if (@in_array("IL", $fields["state"])) echo "selected"; ?>>Illinois</option>
<option value="IN" <?php if (@in_array("IN", $fields["state"])) echo "selected"; ?>>Indiana</option>
<option value="IA" <?php if (@in_array("IA", $fields["state"])) echo "selected"; ?>>Iowa</option>
<option value="KS" <?php if (@in_array("KS", $fields["state"])) echo "selected"; ?>>Kansas</option>
<option value="KY" <?php if (@in_array("KY", $fields["state"])) echo "selected"; ?>>Kentucky</option>
<option value="LA" <?php if (@in_array("LA", $fields["state"])) echo "selected"; ?>>Louisiana</option>
<option value="ME" <?php if (@in_array("ME", $fields["state"])) echo "selected"; ?>>Maine</option>
<option value="MD" <?php if (@in_array("MD", $fields["state"])) echo "selected"; ?>>Maryland</option>
<option value="MA" <?php if (@in_array("MA", $fields["state"])) echo "selected"; ?>>Massachusetts</option>
<option value="MI" <?php if (@in_array("MI", $fields["state"])) echo "selected"; ?>>Michigan</option>
<option value="MN" <?php if (@in_array("MN", $fields["state"])) echo "selected"; ?>>Minnesota</option>
<option value="MS" <?php if (@in_array("MS", $fields["state"])) echo "selected"; ?>>Mississippi</option>
<option value="MO" <?php if (@in_array("MO", $fields["state"])) echo "selected"; ?>>Missouri</option>
<option value="MT" <?php if (@in_array("MT", $fields["state"])) echo "selected"; ?>>Montana</option>
<option value="NE" <?php if (@in_array("NE", $fields["state"])) echo "selected"; ?>>Nebraska</option>
<option value="NV" <?php if (@in_array("NV", $fields["state"])) echo "selected"; ?>>Nevada</option>
<option value="NH" <?php if (@in_array("NH", $fields["state"])) echo "selected"; ?>>New Hampshire</option>
<option value="NJ" <?php if (@in_array("NJ", $fields["state"])) echo "selected"; ?>>New Jersey</option>
<option value="NM" <?php if (@in_array("NM", $fields["state"])) echo "selected"; ?>>New Mexico</option>
<option value="NY" <?php if (@in_array("NY", $fields["state"])) echo "selected"; ?>>New York</option>
<option value="NC" <?php if (@in_array("NC", $fields["state"])) echo "selected"; ?>>North Carolina</option>
<option value="ND" <?php if (@in_array("ND", $fields["state"])) echo "selected"; ?>>North Dakota</option>
<option value="OH" <?php if (@in_array("OH", $fields["state"])) echo "selected"; ?>>Ohio</option>
<option value="OK" <?php if (@in_array("OK", $fields["state"])) echo "selected"; ?>>Oklahoma</option>
<option value="OR" <?php if (@in_array("OR", $fields["state"])) echo "selected"; ?>>Oregon</option>
<option value="PA" <?php if (@in_array("PA", $fields["state"])) echo "selected"; ?>>Pennsylvania</option>
<option value="RI" <?php if (@in_array("RI", $fields["state"])) echo "selected"; ?>>Rhode Island</option>
<option value="SC" <?php if (@in_array("SC", $fields["state"])) echo "selected"; ?>>South Carolina</option>
<option value="SD" <?php if (@in_array("SD", $fields["state"])) echo "selected"; ?>>South Dakota</option>
<option value="TN" <?php if (@in_array("TN", $fields["state"])) echo "selected"; ?>>Tennessee</option>
<option value="TX" <?php if (@in_array("TX", $fields["state"])) echo "selected"; ?>>Texas</option>
<option value="UT" <?php if (@in_array("UT", $fields["state"])) echo "selected"; ?>>Utah</option>
<option value="VT" <?php if (@in_array("VT", $fields["state"])) echo "selected"; ?>>Vermont</option>
<option value="VA" <?php if (@in_array("VA", $fields["state"])) echo "selected"; ?>>Virginia</option>
<option value="WA" <?php if (@in_array("WA", $fields["state"])) echo "selected"; ?>>Washington</option>
<option value="WV" <?php if (@in_array("WV", $fields["state"])) echo "selected"; ?>>West Virginia</option>
<option value="WI" <?php if (@in_array("WI", $fields["state"])) echo "selected"; ?>>Wisconsin</option>
<option value="WY" <?php if (@in_array("WY", $fields["state"])) echo "selected"; ?>>Wyoming</option>
<option value="AS" <?php if (@in_array("AS", $fields["state"])) echo "selected"; ?>>American Samoa (US Terr)</option>
<option value="FM" <?php if (@in_array("FM", $fields["state"])) echo "selected"; ?>>Fed. Micronesia (US Terr)</option>
<option value="GU" <?php if (@in_array("GU", $fields["state"])) echo "selected"; ?>>Guam (US Terr)</option>
<option value="MH" <?php if (@in_array("MH", $fields["state"])) echo "selected"; ?>>Marshall Islands (US Terr)</option>
<option value="MP" <?php if (@in_array("MP", $fields["state"])) echo "selected"; ?>>N. Mariana Islands (US Terr)</option>
<option value="PW" <?php if (@in_array("PW", $fields["state"])) echo "selected"; ?>>Palau (US Terr)</option>
<option value="PR" <?php if (@in_array("PR", $fields["state"])) echo "selected"; ?>>Puerto Rico (US Terr)</option>
<option value="VI" <?php if (@in_array("VI", $fields["state"])) echo "selected"; ?>>Virgin Islands (US Terr)</option>
<option value="AE" <?php if (@in_array("AE", $fields["state"])) echo "selected"; ?>>Arm. Force Africa (Military)</option>
<option value="AA" <?php if (@in_array("AA", $fields["state"])) echo "selected"; ?>>Arm. Force Americas (Military)</option>
<option value="AE" <?php if (@in_array("AE", $fields["state"])) echo "selected"; ?>>Arm. Force Canada (Military)</option>
<option value="AE" <?php if (@in_array("AE", $fields["state"])) echo "selected"; ?>>Arm. Force Europe (Military)</option>
<option value="AE" <?php if (@in_array("AE", $fields["state"])) echo "selected"; ?>>Arm. Force Mid. East (Military)</option>
<option value="AP" <?php if (@in_array("AP", $fields["state"])) echo "selected"; ?>>Arm. Force Pacific (Military)</option>

</select>

</div>

<input type='text' id='zip' name='zip' value="<?=@$fields["zip"]?>" style="margin-left:30px; display:inline; width:80px">

</div>

</div>

<div id='div15' name='div15' style="margin-top:20px">

<p style="margin-left:250px; display:inline">Telephone :
<span style="margin-left:105px; display:inline">E-mail :</span>
</p>

</div>

<div id='div16' name='div16'>

<input type='text' id='phone' name='phone' value="<?=@$fields["phone"]?>" style="margin-left:250px; display:inline">
<input type='text' id='email' name='email' value="<?=@$fields["email"]?>" style="margin-left:30px; display:inline; width:270px">

</div>

</div>


<div id='div17' name='div17' style="text-align:center; margin-top:48px">

<p style="font-size:18pt; margin:0px 0px 3px 12px"><span style="font-weight:bold; text-decoration:underline">
Questions and/or Comments</span><br><span style="color:#00ffff; font-size:8pt">(2000 characters maximum)
</span>
</p>

<textarea id='comm' name='comm' cols='100' rows='5' wrap='hard' maxlength='2000' value=""
onKeyUp="toCount('comm', 'showcount1', '{CHAR} characters left.', 2000)"><?=@$fields["comm"]?></textarea>

<br>

<div class='minitext' id='div18' name='div18' style="font-size:8pt; color:#ff9900; text-align:left;
margin-left:90px">
<span id='showcount1' name='showcount1'>2000<span style="color:#ffffff"> characters left.</span></span>
</div>

</div>


<div style="text-align:center; margin:60px auto 12px auto; width:30%">

<?php

ft_api_display_captcha();

?>


</div>


<div id='div19' name='div19' style="text-align:center; margin:48px 0px">

<div id='div20' name='div20'>

<button type='submit' id='button' name='contact' class='submit' value="submit">
<img src='/Images/submit.png' alt='submit' style="margin-left:-7px">
</button>

</div>

<br>
<br>

</div>

</form>


</div>

</body>

</html>




The following code is my "thank you" page with Formtool code in orange:


<?php

require_once("/home2/scottfam/public_html/babybraceletsandsuch.com/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();

?>


<!DOCTYPE html>

<html>

<head>

<link rel="stylesheet" href="/CSS/sitePage.css">

</head>

<body>

<div id='div1' name='div1' class='head'>

<p class='header1'>Successful Submission</p>

<p style="margin:36px 36px 0px 36px">Your questions, comments and concerns about Baby Bracelets and Such have been
successfully submitted and if you left an e-mail address, you will receive a confirmation regarding this
submission.&nbsp; Your message has been received and will be reviewed and addressed as soon as possible.

<br>
<br>

Respectfully,

<br>
<br>

<span style="font-family:Janda As Long As You Love Me, Arial; font-size:18pt; color:#00ffff">
V L Scott , Sr .</span>

<br>

V. L. Scott, Sr.

<br>

Baby Bracelets and Such
</p>

</div>


<div id='div2' name='div2' style="text-align:center; margin:200px 0px 0px 0px">

<div id='continue' name='continue'>

<button type='submit' id='button1' name='continue' class='submit' value="continue"
onclick="window.location.replace('../homepage.php')">
<img src='/Images/continue.png' alt='Continue' style="margin-left:-7px">
</button>

</div>

</div>


</body>

</html>




I thank you in advance for your time and input in this problem.

Van L Scott Sr
Reply
#2
Hi Van,

The API and reCAPTCHA can be finicky sometimes. We've had other users report this before.

You might want to try bypassing the API to use reCAPTCHA: http://forums.formtools.org/showthread.php?tid=2306 or you can change to the post method instead.

Cheers,

Joe
Reply
#3
First of all, I would like to say that you ARE a VERY busy person. I have received noticies that you have answered 3 threads (old and new) that I had written going back for a least a year within a 30 minute period so my hat is of to you for the help to the rest of us. In regards to your response, I have read that thread several times and I believe that is what I was working on (it's been so many issues ago) when I read about the reCaptcha functions within the Formtool core so I switched to involving myself to the Formtool function. My thought was no sense adding to the processing of a page when it is already integrated within the processing core itself. Since I have basically cleared all of this effort, I will go back and try the install suggestion as per the thread mentioned and see where that takes me.

One quick question, I only use the "post" method when processing any of my pages with forms (not all forms are sent through Formtools as I want total control of certain databases) but you mentioned in your reply that I could "change my form to the post method". I assume that was just part of the advised commentary but just in case there is something that I need to know or learn, could you elaborate on that part of your answer. Meanwhile, I'll get started on the suggested thread's process and see how that works out. Will let you know with either an update or another question needing an answer.

Just a parting note - Formtools is one of the easiest and comprehensive form processing packages that I have used (have used paid and fee based ones in the past) and any additions to the product could only give the user that many more options but what I find to be the most outstanding quality of Formtools is the quick response to the questions/problems that us with less knowledge have in this/these areas. I know that this sounds like a sales rep selling something but when I think a compliment/acommendation is warranted, I'm the first in line to say or do so.

Respectfully,

Van
Reply
#4
Just writing back to say that I have managed to not only get a Captcha working on my form (using Joe's link to phpcaptcha.org) but was able to integrate this Captcha software and was able to create and get a custom error page working. I do not know if this is for everyone but if you use this link, it is in its basic form and with a little modification, anyone should be able to customize it for their intended use. If you read its documentation, it is pretty much self explanitory. Good luck to all.
Reply
#5
Hi Van,

Thanks so much for your kinds words. We really appreciate your feedback.

Happy to hear that you were able to get Captcha working on your forms. Please let us know if anything else comes up.

Cheers,

Joe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)