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



Form Tools
Multi-Thread Form Setup - 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-Thread Form Setup (/showthread.php?tid=190)



Multi-Thread Form Setup - tr3x86 - Jun 24th, 2009

I'm having trouble with a 3 page multi-form. Doesn't seem to carry information on to Form Tools to get past Step 3.

I've been messing with it for hours and I'm sure I'm missing something simple. Is there something wrong with the code?

Page 1:
Code:
<!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" />
<link media="all" rel="stylesheet" type="text/css" href="css/style.css" />
<title>BendPak Lead Generation</title>

<body>

<h1>Lead Generation<sup>beta</sup></h1>

<?php
require_once("global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
  "submit_button" => "next_page",
  "next_page" => "/lead-details.php",
  "form_data" => $_POST
    );
ft_api_process_form($params);
?>

<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" class="lead-form">

<div id="buyer_information">

    <h2>Buyer Information</h2>
        
    <fieldset>
    <label>Name:</label>
    <input type="text" name="name" maxlength="32">
    <label>Company Name:</label>
    <input type="text" name="company" maxlength="32">
    </fieldset>
    <input name="next_page" type="submit" />
    
</div>
</form>

</body>
</html>

Page 2:
Code:
<!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" />
<link media="all" rel="stylesheet" type="text/css" href="css/style.css" />
<title>Untitled Document</title>

<body>

<h1>Lead Generation<sup>beta</sup></h1>

<?php
require_once("global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
  "submit_button" => "next_page1",
  "next_page" => "/comments-submit.php",
  "form_data" => $_POST,
  "no_sessions_url" => "/buyer-info.php"
    );
ft_api_process_form($params);
?>

<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" class="lead-form">

<div id="lead_details">
    
    <h2>Lead Details</h2>
    
    <fieldset>
    <h3>Referral to BendPak</h3>      

    <label>If Internet Blog-Forum / Which One?</label>
    <input type="text" name="blog" maxlength="32">
    <label>If TV Show / Which One?</label>
    <input type="text" name="tv" maxlength="32">
    
  
    </fieldset>
    
    <input name="next_page1" type="submit" />

</div>

</body>
</html>

Page 3:
Code:
<!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" />
<link media="all" rel="stylesheet" type="text/css" href="css/style.css" />
<title>BendPak Lead Generation</title>

<body>

<?php
require_once("global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
  "submit_button" => "submit",
  "next_page" => "/thanks.php",
  "form_data" => $_POST,
  "finalize" => true
    );
ft_api_process_form($params);
?>

<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="post" class="lead-form">

<h1>Lead Generation<sup>beta</sup></h1>

<div id="comments_submit">

    <fieldset>
    <h2>Add Comments &amp; Submit</h2>
    <label>Add comments pertaining to this lead:</label>
    <textarea name="comments"></textarea>
    <label>Add comments for the distributor:</label>
    <textarea name="comments"></textarea>
    </fieldset>
    <input name="submit" type="submit" />

</div>

</form>

</body>
</html>

Any help is much appreciated.

Thanks,

Tyler
Please ignore me... just figured it out.

Funny how that happens.


RE: Multi-Thread Form Setup - Ben - Jun 27th, 2009

Hi Tyler,

Glad you figured it out!

Just one thing - make sure you include your PHP above the opening HTML. I'm actually surprised this is working for you! ft_api_process_form() uses a "header redirect" to go to the next page. Normally that only works if the HTML hasn't been outputted to the browser yet. Surprising!

- Ben