May 14th, 2014, 10:24 AM
I'm having the same issue with a single-page form.
Everything works beautifully except for the redirect to the "thank you" page after submitting. After submitting, a blank form page is displayed, rather than the redirect page.
Form Tools version 2.0.6
Form Page PHP (index.php):
<?php
require_once(“/path/to/formtools/global/api/api.php");
$fields = ft_api_init_form_page(12);
$params = array(
"submit_button" => "submitform",
"next_page" => "thankyou.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
Form Tag:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="post">
Named submit button:
<input name="submitform" type="submit" value="Submit" />
Thank You Page PHP (thankyou.php — in the same directory as index.php):
<?php
require_once(“/path/to/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
I should note that I've modified this form to use the Form Tools API, and as such the Redirect URL isn't configured for this form in the admin interface. I followed this tutorial: http://docs.formtools.org/tutorials/api_...page=step1
When it was using the direct form submission method, the redirect worked as expected.
Am I missing something obvious? Do I need to upgrade Form Tools to the latest version?
Any help is appreciated.
Everything works beautifully except for the redirect to the "thank you" page after submitting. After submitting, a blank form page is displayed, rather than the redirect page.
Form Tools version 2.0.6
Form Page PHP (index.php):
<?php
require_once(“/path/to/formtools/global/api/api.php");
$fields = ft_api_init_form_page(12);
$params = array(
"submit_button" => "submitform",
"next_page" => "thankyou.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
Form Tag:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="post">
Named submit button:
<input name="submitform" type="submit" value="Submit" />
Thank You Page PHP (thankyou.php — in the same directory as index.php):
<?php
require_once(“/path/to/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
I should note that I've modified this form to use the Form Tools API, and as such the Redirect URL isn't configured for this form in the admin interface. I followed this tutorial: http://docs.formtools.org/tutorials/api_...page=step1
When it was using the direct form submission method, the redirect worked as expected.
Am I missing something obvious? Do I need to upgrade Form Tools to the latest version?
Any help is appreciated.