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
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
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
Failure to redirect to thank you page upon submission - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: Failure to redirect to thank you page upon submission (/showthread.php?tid=2544)

Pages: 1 2 3


RE: Failure to redirect to thank you page upon submission - Joe - Apr 22nd, 2014

On the thank you page you can just add the parameter "no_sessions_url" => "index.php" to redirect users who try to access the page directly.

Cheers,

Joe



RE: Failure to redirect to thank you page upon submission - Mservices - Apr 22nd, 2014

Hi Joe,

Thanks, that would be great! wasn't that i'm not familiar enough with php to understand how to implement it, So if you could help me out a bit more i would be utterly thankful ;-)
I guess index.php could also be the url of the form page for registering?
Where should i put the code?

The code at the top of my thank you page was:

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

I added it into:

<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array("no_sessions_url" => "/formulier-infomap.php");ft_api_clear_form_sessions();
?>

But that doesn't do the trick, i'm not redirected to the form page....
any ideas?
Thanks again for your time,
Peter


RE: Failure to redirect to thank you page upon submission - Joe - Apr 25th, 2014

Hey Peter,

The code should always be at the top of the page. The code actually looks right but you should be using the path to the API: require_once("/home/scottfam/public_html/babybraceletsandsuch.com/form_tools/global/api/api.php");

Try that and see if it works.

Cheers,

Joe


RE: Failure to redirect to thank you page upon submission - Mservices - Apr 26th, 2014

Hi Joe,

If i point to the api.php like you sugested:
require_once("/var/www/vhosts/marcheservices.eu/httpdocs/formtools/global/api/api.php");
the thank you page does not redirect either...

the top of the thank you page looks like this now:
<?php
require_once("/var/www/vhosts/marcheservices.eu/httpdocs/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array("no_sessions_url" => "/infomap/formulier-infomap.php");
ft_api_clear_form_sessions();
?>

In my case the formulier-infomap.php is the registration form wich is together with the thank you page situated in the directory infomap. infomap and formtools directory are both in the root of my site

Realy would like this to work because it would be a simple solution that solves my problem......

Thanks for your time!


RE: Failure to redirect to thank you page upon submission - Joe - Apr 28th, 2014

Hey Peter,

I should have noticed this earlier. You're actually missing the function to process the parameters. Your code should look like this:

<?php
require_once("/var/www/vhosts/marcheservices.eu/httpdocs/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array("no_sessions_url" => "/infomap/formulier-infomap.php");
ft_api_process_form($params);
ft_api_clear_form_sessions();
?>

Hope this helps.

Cheers,

Joe


RE: Failure to redirect to thank you page upon submission - Mservices - Apr 28th, 2014

Hi Joe....

Sorry, but that doesn't work. Don't know why but if i change it to what you suggested i get the following error: (either by going directly to the thank you page but also when i get there after filling out the registration form...)

ERROR
Error Type: User
Error Code: #306 — Learn more about this error.

Thank you for your help so far....
Peter


RE: Failure to redirect to thank you page upon submission - Joe - Apr 29th, 2014

Hi Peter,

Try this instead:

<?php
require_once("/var/www/vhosts/marcheservices.eu/httpdocs/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array(
"no_sessions_url" => "/infomap/formulier-infomap.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
ft_api_clear_form_sessions();
?>

Cheers,

Joe


RE: Failure to redirect to thank you page upon submission - Mservices - Apr 29th, 2014

(Apr 29th, 2014, 11:20 AM)Joe Wrote: Hi Peter,

Try this instead:

<?php
require_once("/var/www/vhosts/marcheservices.eu/httpdocs/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array(
"no_sessions_url" => "/infomap/formulier-infomap.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
ft_api_clear_form_sessions();
?>

Cheers,

Joe

Hi Joe!
that did the trick! Thanks man, i'm really thankful for your help!
Keep up the good work!

Peter


RE: Failure to redirect to thank you page upon submission - Joe - Apr 30th, 2014

Hey Peter,

Glad everything is working! All the best!

Cheers,

Joe


RE: Failure to redirect to thank you page upon submission - williakj - May 14th, 2014

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_single_page_form/index.php?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.