Jun 28th, 2010, 1:49 PM
First of all, thanks Ben for this excellent tool.
Everything is going great, except for one last detail: we'd like the "thank you" page to display the form values so the user can print them. However, I can't get the values to show up. I've followed the tutorial and looked into past threads about the issue, but I still only get a blank space on my thank you page where the php coding is. It doesn't show any errors and the form otherwise submits as it should. I've noticed that up in the URL, a submission id is displayed but not a unique key (it's just blank after &unique_key=)
I'm new to Form Tools and PHP so I'm probably just missing something obvious somewhere! I appreciate any help, thanks.
At the top of the form page:
At the top of the thanks page:
In the thanks page:
Everything is going great, except for one last detail: we'd like the "thank you" page to display the form values so the user can print them. However, I can't get the values to show up. I've followed the tutorial and looked into past threads about the issue, but I still only get a blank space on my thank you page where the php coding is. It doesn't show any errors and the form otherwise submits as it should. I've noticed that up in the URL, a submission id is displayed but not a unique key (it's just blank after &unique_key=)
I'm new to Form Tools and PHP so I'm probably just missing something obvious somewhere! I appreciate any help, thanks.
At the top of the form page:
PHP Code:
<?php
require_once("/data/18/1/10/67/1662067/user/1792427/htdocs/ourforms/global/api/api.php");
$fields = ft_api_init_form_page(1);
$submission_id = $fields["form_tools_submission_id"];
$unique_key = $fields["unique_key"];
$params = array(
"submit_button" => "Submit",
"next_page" => "templates/giftcertificatesuccess.php?submission_id=$submission_id&unique_key=$unique_key",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
At the top of the thanks page:
PHP Code:
<?php
require_once("/data/18/1/10/67/1662067/user/1792427/htdocs/ourforms/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
In the thanks page:
PHP Code:
<?php
if (isset($_GET["submission_id"]) && isset($_GET["unique_key"]))
{
$form_id = 1;
$view_id = 1;
$export_type_id = 3;
$submission_info = ft_api_get_submission($form_id, $_GET["submission_id"]);
// now confirm that the unique_key matches
if (isset($submission_info["unique_key"]) &&
$submission_info["unique_key"] == $_GET["unique_key"])
{
ft_api_show_submission($form_id, $view_id, $export_type_id, $_GET["submission_id"]);
}
}
?>