Apr 21st, 2014, 6:45 AM
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
second step : form_second.php
last page : thanks.php
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 !!