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 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
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
Thank you page issue (not passing on) - 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: Thank you page issue (not passing on) (/showthread.php?tid=1337)



Thank you page issue (not passing on) - gpdesigner - Jun 2nd, 2011

Hello Ben,
Hey Thanks for this awesome program you have here . .
I am setting up a form and and having issues passing on form field to thank you page . .
I went through all the tutes and read some of the threads here but it seems that my answers are not here . . . here are my code tags
In form head:
Code:
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page(3);
$params = array(
  "submit_button" => "mcs_order",
  "next_page" => "confirmation.php",
  "form_data" => $_POST,
  "finalize" => true
    );
ft_api_process_form($params);
?>

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

This is in thank you head:
Code:
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
$submission_id = $fields["formtools_submission_id"];
$unique_key    = $fields["unique_key"];


?>

This is in my Div tag"
Code:
<?php
if (isset($_GET["submission_id"]) && isset($_GET["unique_key"]))
{
  $form_id = 3;
  $view_id = 1;
  $export_type_id = 1;

  $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"]);
  }    
}
?>

I installed all the modules and checked all the pass on variables but I get no code in my address bar and the thank you page is blank . .
Here is the form links
http://www.militarycuts.com/form.php

Thanks in advance
ciao


RE: Thank you page issue (not passing on) - Ben - Jun 3rd, 2011

Hey gpdesigner,

Hmm! At a quick glance, your code looks okay. So when you say your thank you page is blank, do you mean totally while (no HTML at all), or just that the results aren't being output into the page?

If the latter, you could try adding this to the PHP at the top of the page (after the ft_api_init_form_page() function call):
Code:
print_r($fields);

That will output everything that it found in sessions at that point.

However, I looked at your form page and things look a little wonky. The form doesn't submit on Firefox. Since I don't see any offending JS, my hunch is that the markup is a little wrong.

One thing I noticed (and this may well be unrelated), but I don't think comments of this form are valid: <!----- ------> They should only be <!-- --> (only two dashes either side). When I view source in Firefox, it shows a great deal of your page to be commented out. Also, I ran into a problem one time with XHTML strict when my javascript had lines of ----- in it. That also threw errors in Safari or something... Generally best to stick to the standard comment tags to ensure all weird & wonderful browsers won't break.

Let me know how it goes.

- Ben



RE: Thank you page issue (not passing on) - gpdesigner - Jun 3rd, 2011

Hello Ben Thanks for the speedy reply,
it is much appreciated.

(Jun 3rd, 2011, 1:27 AM)Ben Wrote: If the latter, you could try adding this to the PHP at the top of the page (after the ft_api_init_form_page() function call):
Code:
print_r($fields);

I put the code in and it did print out the session at the top of the page so I guess it is coming through, why it isn't showing up in the div is a mystery to me. Maybe I need to tinker with the way I put in the PHP ?

(Jun 3rd, 2011, 1:27 AM)Ben Wrote: However, I looked at your form page and things look a little wonky. The form doesn't submit on Firefox.

What version of FF are you using, I am cross browser testing and I am seeing it on everything,

(Jun 3rd, 2011, 1:27 AM)Ben Wrote: One thing I noticed (and this may well be unrelated), but I don't think comments of this form are valid: <!----- ------> They should only be <!-- --> (only two dashes either side). When I view source in Firefox, it shows a great deal of your page to be commented out. Also, I ran into a problem one time with XHTML strict when my javascript had lines of ----- in it. That also threw errors in Safari or something... Generally best to stick to the standard comment tags to ensure all weird & wonderful browsers won't break.


I will look into that maybe the extended comments are screwing things up in Safari on Mac, but it is working fine everywhere else . . . I will give it a look see . . . I have been commentint things out with multiple dashes since 2004 on all my websites, seems this practice is catching up with me, at least when I am using JS on the pages . .

Anyway as I said after adding the bit of code you gave me the session is printing out at the top of all browser pages, what is next?
gp


RE: Thank you page issue (not passing on) - Ben - Jun 3rd, 2011

Heya,

Ah! The problem is that you're detecting for values in the query string, not the fields returned from sessions. Try changing this line:

Code:
if (isset($_GET["submission_id"]) && isset($_GET["unique_key"]))

to this:

Code:
if (isset($fields["form_tools_submission_id"]) && isset($fields["unique_key"]))

That may help.

- Ben



RE: Thank you page issue (not passing on) - gpdesigner - Jun 3rd, 2011

(Jun 3rd, 2011, 6:38 AM)Ben Wrote: Heya,

Ah! The problem is that you're detecting for values in the query string, not the fields returned from sessions. Try changing this line:

Code:
if (isset($_GET["submission_id"]) && isset($_GET["unique_key"]))

to this:

Code:
if (isset($fields["form_tools_submission_id"]) && isset($fields["unique_key"]))

That may help.

- Ben

Oppps I got an FormTools error page . . . code 406
let me check to see if i pasted wrong