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



Form Tools
Cant setup multipage forms - 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: Cant setup multipage forms (/showthread.php?tid=1983)



Cant setup multipage forms - xtreem88 - Apr 4th, 2012

I'm new to formtools, ive read all the tutorials for creating forms, creating a single form was a breeze, but the multi-form seems complex.

The tutorial says the form should start with
PHP Code:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"
but when i do this it doesnt do anything, the page just reloads but when i start with
PHP Code:
<form action="http://localhost/formtools/process.php" method="post" enctype="multipart/form-data"
it submits but doesnt redirect to the next page
Heres my first page:
PHP Code:
<?php
require_once("global/api/api.php");
//$fields = ft_api_init_form_page("", "test");
 
$fields ft_api_init_form_page(3"initialize");
$params = array(
  
"submit_button" => "Continue",
  
"next_page" => "next_page.php",
  
"form_data" => $_POST,
  
"file_data" => $_FILES
    
);
ft_api_process_form($params);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
First Name:  <input type="text" name="FirstName" value="<?=htmlspecialchars(@$fields["FirstName"])?>">
<br />
<br />
Last Name:  <input type="text" name="LastName" value="<?=htmlspecialchars(@$fields["LastName"])?>">
<br />
<br /><input type="hidden" name="form_tools_initialize_form" value="1" />
<input type="hidden" name="form_tools_form_id" value="3" />
<input type="submit" name="submit" value="submit">
</form>
</body>
</html> 

and the next page:

PHP Code:
<?php
require_once("global/api/api.php");
//$fields = ft_api_init_form_page();
$fields ft_api_init_form_page(3"initialize");
$params = array(
  
"submit_button" => "Continue",
  
"next_page" => "next.php",
  
"form_data" => $_POST,
  
"file_data" => $_FILES,
  
"no_sessions_url" => "start.php",
  
"finalize" => true
    
);
ft_api_process_form($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
Welcome
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
Address:  <input type="text" name="Address" value="">
<br />
<br />
City:  <input type="text" name="City" value="">
<br />
<br />
State:  <input type="text" name="State" value="">
<br />
<br />
Zip:  <input type="text" name="Zip" value="">
<br />
<br />
<input type="submit" name="submit" value="submit">
</form>
</body>
</html> 
What am i doing wrong?
Api version 2.2.2