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
Using API - redirect to thanyou page fail
#1
Sad 
Just do not know why is this happening as same thing worked on my local
AFter installation if I submit my form I am being taken to index.php (which is shown as blank) rather than 'thanks.php'. Thanks.php do exist. Also when it is redirecte back for some strange reason favicon change to my host icon rather than the one visible earlier
inde.php
PHP Code:
<?php
require_once("formtools/global/api/api.php");
$fields ft_api_init_form_page(1);
$params = array(
  
"submit_button" => "is_submitted",
  
"next_page" => "[b]thanks.php[/b]",
  
"form_data" => $_POST,
  
"file_data" => $_FILES,
  
"finalize" => true
    
);
    
ft_api_process_form($params);
?>
thanks.php
PHP Code:
<?php
require_once("formtools/global/api/api.php");
$fields ft_api_init_form_page(1); //have also tried without 1
ft_api_clear_form_sessions();
?>

I am using same code for both files on my local which works fine
Just cant understand what is happening Sad(
When i look at the data in mysql i am seeing records enterd as 'NULL' for all columns almost every other row
TIA (i can share my weblink in pm)
so issue seems to be
Despite using "<?php echo $_SERVER["PHP_SELF"]?>" it seems it is not getting redirected to thanks.php but rather to index.php.. any resolution
Reply
#2
I wonder if the problem isn´t that you've mixed style and values in the php.

Look at the array of parameters:
Code:
$params = array(
  "submit_button" => "is_submitted",
  "next_page" => "[b]thanks.php[/b]",

You have surrounded the value thanks.php with [b]. I don't think this is the place to style things. This is just a value that is used elsewhere in the code.
It should be:
"next_page" => "thanks.php",

Did that help?
Reply
#3
First of all I apologize for my English

I have the same problem, when i fill the form, when I put the send button ,don´t redirigue the correct page but again the form page, and don`t show the contect.

The form data is correct write in the database FORMTOOLS.

The code in the page contacto.php
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page(2);
$params = array(
"submit_button" => "enviar",
"next_page" => "gracias.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>

The code in the page gracias.php

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

The code in page has put on head label,
When finish install form run de gracias.php for finish session

Any idea, thanks
Reply
#4
Do you have "enviar" named in your submit button?
Reply
#5
I'm having the exact same problem. Everything in the form passes to Form Tools and looks great. Only problem is the thank you page doesn't display. I get an blank page with the entry form address.

Form:
<?php
require_once("prisms/global/api/api.php");
$fields = ft_api_init_form_page(1);
$params = array(
"submit_button" => "submit",
"next_page" => "prism2013thankyou.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>

Thank you:
<?php
require_once("prisms/global/api/api.php");
$fields = ft_api_init_form_page(1);
ft_api_clear_form_sessions();
?>

Any suggestions? Thanks!
Reply
#6
Hi mderrick,

I had the same issue myself, it was very frustrating but I found a solution (that worked for me)

I had noticed people in the forums using a path like this:
"/home2/UserAcct/public_html/projectName/formtools/global/api/api.php"

I have never used this type of path as a file reference to a web page, it would not have occurred to me.
But, I tried it out in the 3 file references at issue:
require_once (on result page)
require_once (on Form Page)
$params > next_page (on Form Page)


The Solution (if you want to call it that - it feels like spit and bubble gum to me) was using the correct path format for the correct file references. Using the same path format for all three file references did not work (for me). It was only when I accidentally left the path formats inconsistent, that I started getting responses on submits, and realized the path types were mix n' match.

From there, it was not long before I found the correct combination (which works for me anyway):
require_once (on result page) uses a path like: /home2/UserAcct/public_html/projectName/formtools/etc...
require_once (on Form Page) same type of path as above
$params > next_page (on Form Page) = /formtools/global/posforms/posresult.php

It looked to me like other combinations might work, and maybe this is not the correct solution. But I had lost enough time on this and had better just move on to the next part.


I sure hope this helps!
best,
Jim
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)