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
Failure to redirect to thank you page upon submission
#1
I have used Form Tools once in the past on a mutiple page form and it went very well when setting it up; however, I redesigned my website and deleted that form. Now I am using a single page form but I have tried NUMEROUS ways to getting the form to work properly and to no avail. I even reinstalled Form Tools and started from the beginning andx still nothing. When I copy and paste the php info directly from the doc sheets on both the form page and the thank you page and implement them into my forms (before the html tag) and add the "PHP SERVER" statement into the "action" line in the form tag, when submitted it returns the exact same page without the data in the fields as if submission has taken place. I understand about sessions and have cleared them in both using the php statements that Form Tools require on the last page (thank you page), using the delete_session() sessions statement directly or even closing the browser completely and reopening it which should have cleared any sessions period. (Browser in use is IE8 - cannot go any higher due to using xp). I have read and re-read the docs numerous times as well as crawled over a number of threads looking for an answer but no luck (have tried several suggetions). Both of the pages in question can be accessed from the website when called upon. Below is simply the API setup posted at the top of both pages along with any pertinent lines involving the doc information in order from posting both pages in their entirety; however; they can be seen at babybraceletsandsuch.com/contactus.php and /successcontactsubmission.php respectfully.

Contact form:

URL - babybraceletsandsuch/contactus.php

<?php
require_once("/home/scottfam/public_html/babybraceletsandsuch.com/form_tools/global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
"submit_button" => "contact",
"next_page" => "successcontactsubmission.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>

<!DOCTYPE html>


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


<input type='image' name='contact' class='submit' src='/Images/submit.png' alt='Submit'>


Thank You page:

URL - babybraceletsandsuch/successcontactsubmission.php

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

<!DOCTYPE html>

Any help would be greatly appreciated since I cannot find my problem and I have spent almost 3 days simply trying to figure this out and my tylenol bottle is getting pretty low. Thank you for your effort.

P.S. - I did notice that when I viewed the "source" code from the internet that the "php" code on the top of the page is missing. It is definitely on the page located on my computer but it is not there after having been uploaded to my website. Is this normal or do I have another issue that I need to address?
Reply
#2
Hi,

You need the image to carry a value to determine which button was clicked. Using input type=image has issues in some browsers. You will have to use a button with a background image instead of an image. Try adding in a regular button first to see if that is the issue and then you can style the button with CSS afterwards.

Replace: <input type='image' name='contact' class='submit' src='/Images/submit.png' alt='Submit'>

With: <input type="submit" name="contact" value="submit">

Cheers,

Joe
Reply
#3
Wink 
Thank you VERY much , Joe. I followed your response and went back and created a simple "submit" button and it works as it should. I would have never given this a thought as I would (and did) assume I had the submit button constructed properly. Now that you told me this, I can see how that this would be a problem with the "image" setup. You have saved me the time and expense (buying more tylenol) of getting this to work. Again, thank you and "CHEERS!" back at you.
Reply
#4
No problem. In response to your other question that you sent. The code is not looking for a value but looking for an attribute (name) that specifies the name of the <input> element. You can change the value to whatever you want in the value attribute, a value (any value) just needs to be supplied. The application needs to know that a submission has been made.

Cheers,

Joe
Reply
#5
Wink 
Thanks and enjoy the rest of your day.
Reply
#6
I'm having a similar problem. My code is:
<li class="buttons">
<input type="hidden" name="form_id" value="698732" />

<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
</ul>
</form>

What do I need to change?
Reply
#7
Hi Walt,

Hard to say exactly what needs to be changed. As code for a submit button it looks correct. Please post your code as well.

Cheers,

Joe
Reply
#8
Hi, I'm new here and first want to say that formtools solved a lot of my problems with forms on my website that need to ad data to a database.

On one of my sites i use a external form with the api to let people register before they can download a file from another page. I'm using the thank you page redirect for that. and that is working fine right now.
The problem (and question) is that i only want people who registered to be able to reach the thank you page....

is there a way to forward them to a thankyou page that is located in password protected directory?

this is the code in my form and obviously i would like to password protect directory "74vzx367aw"

<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(1);
$params = array(
"submit_button" => "send",
"next_page" => "74vzx367aw/infomappagina.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>

Perhaps i'm trying to do this in the wrong way so any ideas to do it different than this are very welcome!!
Reply
#9
Hi there,

Why don't you just make fields mandatory? One the fields are filled and the user can be flagged as registered and proceed to the thank you form.

Cheers,

Joe
Reply
#10
(Apr 21st, 2014, 10:33 AM)Joe Wrote: Hi there,

Why don't you just make fields mandatory? One the fields are filled and the user can be flagged as registered and proceed to the thank you form.

Cheers,

Joe

Hi Joe,
Thanks for your response!
There are several mandatory fields, but the problem is that i want only people who first registered by filling out the form can download the file from the thank you page. now, when somebody registers they could copy the address of the thank you page and give that address to others who then can download the file without registering....
any tips are more than welcome!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)