Form Tools
multi-page form don't work - 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: multi-page form don't work (/showthread.php?tid=2996)



multi-page form don't work - nooneelse - Apr 21st, 2014

hi
i'm tring to step up multi step form using For tolls but i doesn't work,
when i submit the first page i just have a blanc page

fist step : form_first.php
PHP Code:
<?php
require_once("mypath/formtools/global/api/api.php");
$fields ft_api_init_form_page(1"initialize");
$params = array(
  
"submit_button" => "sbmt",
  
"next_page" => "form_second.php",
  
"form_data" => $_POST
    
);
ft_api_process_form($params);
?><!DOCTYPE html>
<head>   
</head>
<body>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="form">
<label>input 1</label>
<input name="input_1" type="text" >
<label>input 2</label>
<input name="input_2" type="text" >
<input type="submit" name="sbmt"  class="btnvalid" value="go">
</form>
</body>
</html> 


second step : form_second.php
PHP Code:
<?php
require_once("mypath/formtools/global/api/api.php");
$fields ft_api_init_form_page();
$params = array(
  
"submit_button" => "sbmtsecond",
   
"next_page" => "thanks.php",
  
"form_data" => $_POST,
  
"no_sessions_url" => "form_first.php",
  
"finalize" => true
    
);
ft_api_process_form($params);
?><!DOCTYPE html>
<head>   
</head>
<body>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="form">
<label>input 3</label>
<input name="input_3" type="text" >
<label>input 4</label>
<input name="input_4" type="text" >
<input type="submit" name="sbmtsecond"  class="btnvalid" value="finish">
</form>
</body>
</html> 

last page : thanks.php
PHP Code:
<?php
require_once("mypath/formtools/global/api/api.php");
$fields ft_api_init_form_page();
print_r($fields);
ft_api_clear_form_sessions();
?>
thank you !!