The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Passing On info to the success page - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Passing On info to the success page (/showthread.php?tid=598)

Pages: 1 2


RE: Passing On info to the success page - Ben - Oct 3rd, 2010

Hey wsargent,

Oops, no I was mistaken. My original post was okay - the value SHOULD be there. haha Smile

So you're only getting those two values? Doesn't your form contain any other fields, or did you just omit those when pasting it in the post?

I've actually been reading over my code for almost an hour now and it all seems pretty sound. I don't suppose it would be possible to get access to your site so I could debug the problem directly? If so, email me your Form Tools login, form name & FTP info at ben.keen@gmail.com.

- Ben


RE: Passing On info to the success page - wsargent - Oct 3rd, 2010

I can give you the login info etc, but unfortunately my institution won't let you login to FTP remotely Sad


RE: Passing On info to the success page - Ben - Oct 5th, 2010

I know we solved this by email, but just to close this thread:

Here's the problem: the code I posted only works for multi-page forms. What's happening is that the Submission Pre-Parser adds the unique_key to the POST request within the ft_api_process_form function, and at that point you've already passed the redirect URL as a parameter. Thing is, it's not defined, unlike the submission ID which is loaded as soon as you go to the page.

But it's actually an easy fix! Try this:

1. in your form file, change the "next_page" line to remove passing along the submission ID & unique key via the query string.

2. in your thankyou page, change the top PHP code to this:

PHP Code:
<?php
require_once("./global/api/api.php");
$fields ft_api_init_form_page();
ft_api_clear_form_sessions();

$submission_id $fields["form_tools_submission_id"];
$unique_key    $fields["unique_key"];
?>

On this page, the $fields variable does contain everything we need: so we don't need to pass anything via the query string at all!

Then, in the code later in the page, just reference those variables instead of the $_GET ones:

PHP Code:
<?php
if (!empty($submission_id) && !empty($unique_key))

  
// these variables will need to be defined with the appropriate value
  
ft_api_show_submission($form_id$view_id$export_type_id$submission_id);
}
?>


- Ben


RE: Passing On info to the success page - kapsig431 - Feb 10th, 2011

Ben, I sent you an email on this but thought I'd try to get a hold of you this way as well. I'm having one heck of a time getting this to to work. Can you please take a look at my code and let me know if you see anything wrong?

Form is located at:http://www.roadcareplus.com/main/activation-online.php
Thank you:http://www.roadcareplus.com/main/thankyou-online.php


FORM PAGE PHP:

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

$submission_id = $fields["submission_id"];
$unique_key = $fields["unique_key"];

$params = array(
"submit_button" => "submit",
"next_page" => "thankyou-online.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>

//Just showing you the action part of my form

<form id="form" action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" onsubmit="return rsv.validate(this, rules)">



THANK YOU PAGE PHP:

//Prior to the HTML tag

<?php
require_once("formtools/global/api/api.php");

$fields = ft_api_init_form_page();

ft_api_clear_form_sessions();

$submission_id = $fields["submission_id"];
$unique_key = $fields["unique_key"];

?>

//In the div where I want my results

<?php
if (!empty($submission_id) && !empty($unique_key))
{
$form_id = 4;
$view_id = 4;
$export_type_id = 3;

{
ft_api_show_submission($form_id, $view_id, $export_type_id, $submission_id);
}
}
?>

Note: All of the tutorials stated that I should have seen a value in my url string when I checked the "pass on" radio button. I was never able to get that to work prior to trying your method in this thread. Perhaps my values aren't being passed at all? I don't know how to properly debug.

Thanks so much for any help you can give.