FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi page form - can't get past step 3
#1
Shocked 
I get the error: Form Tools hasn't received a successful test submission yet. And I don't know what I'm doing wrong? I have followed the installation guide for the multipage form.

I have 3 pages within the multipage form:
http://ads.veromoda.com/index.php
http://ads.veromoda.com/choose-image.php
http://ads.veromoda.com/thank-you.php

But I have a few questions for the installation guide.

In step 1 it says that in the form attribute it should look like this:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> Does that apply for all my pages with the multipage form? it's only mentioned in step 1?

In step 2 it says that the php to insert should be in the top of the page where it should be inserted to the top of the form in step 1. Is it important where the php is inserted. I've tried both - but nothing works?

Is there someone who would take a look at my code and tell me what I'm doing wrong, please?

Thanks in advance Smile




Reply
#2
Hi Nuka,

Sorry for the wait!

Quote:In step 1 it says that in the form attribute it should look like this:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> Does that apply for all my pages with the multipage form? it's only mentioned in step 1?

Yup! All forms.

Quote:In step 2 it says that the php to insert should be in the top of the page where it should be inserted to the top of the form in step 1. Is it important where the php is inserted. I've tried both - but nothing works?

For this, I'll need to see your code, I'm afraid. Would you mind posting your page 2 HTML + PHP?

- Ben

Reply
#3
(Jun 17th, 2011, 2:31 AM)Ben Wrote: Hi Nuka,

Sorry for the wait!

Quote:In step 1 it says that in the form attribute it should look like this:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> Does that apply for all my pages with the multipage form? it's only mentioned in step 1?

Yup! All forms.

Quote:In step 2 it says that the php to insert should be in the top of the page where it should be inserted to the top of the form in step 1. Is it important where the php is inserted. I've tried both - but nothing works?

For this, I'll need to see your code, I'm afraid. Would you mind posting your page 2 HTML + PHP?

- Ben

Hi Ben
Thank you for getting back - and sorry that I'm slow at getting back to you. But I've tried to run the installation again and again - and still I get the "Form Tools hasn't received a successful test submission yet."
But heres' my code for page 1:
PHP 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" />
<
title>Welcome to ads.veromoda.com</title>
<
link href="CSS/ads-style.css" rel="stylesheet" type="text/css" />

<
style type="text/css">
body {
    
margin-left0px;
    
margin-top0px;
    
margin-right0px;
    
margin-bottom0px;
    
background-color#EEE;
}
h1 {
    
font-size14px;
}
h2 {
    
font-size10px;
}


h1,h2,h3,h4,h5,h6 {
    
font-familyArialHelveticasans-serif;

</
style>
</
head>

<
body>
<
div id="container">
  <
div id="header"></div>
  <
div id="content">
    <
div class="VM-adsservice-pic"></div>
    
    <
form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
    
    
    
    <?
php
require_once("formtools/global/api/api.php");
$fields ft_api_init_form_page("""test");
$params = array(
  
"submit_button" => "submit_order1",
  
"next_page" => "choose-image.php",
  
"form_data" => $_POST
    
);
ft_api_process_form($params);
print_r($fields);
?>



    <table width="765" border="0" align="left">
      <tr>
        <td colspan="3" align="left"><h1>To order  printed material please fill out the form below:</h1>
          <p>&nbsp;</p></td>
      </tr>
      <tr>
        <td colspan="3" align="left">
          Fields marked with * are mandatory:
          </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="left"><strong>Shopnumber</strong>: *</td>
        <td align="left"><strong>Shopname</strong>: *</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="left"><input type="text" name="shopnumber" id="shopnumber" /></td>
        <td align="left"><input type="text" name="shopname" id="shopname" /></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="left">&nbsp;</td>
        <td align="left">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="left"><strong>Deadline</strong>: <br />          
          <span id="result_box" lang="en" xml:lang="en"><span title="Klik her for at f√• vist alternative overs√¶ttelser">When</span> must the material be received by the shop or magazine/newzpaper*</span></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="left"><input type="text" name="deadline" id="deadline" /></td>
        <td align="left">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td align="left"></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
      <tr>
      
        <td colspan="3" align="left"><strong>Type of material</strong>: <br />
          This is important when creating the print ready pdf-file</td>
      </tr>
      <tr>
        <td colspan="3"><div>
        <fieldset>
          <table width="700" border="0" align="center">
            <tr>
              <td width="185" align="left">
<input type="checkbox" name="media[]" value="Ad for newspaper" />
Ad for newspaper </td>
              <td width="185" align="left">
                <input type="checkbox" name="media[]" value="Ad for magazine" />
                Ad for Magazine
                </td>
              <td width="185" align="left">
<input type="checkbox" name="media[]" value="Flyer" />
Flyer</td>
              <td width="185" align="left">
<input type="checkbox" name="media[]" value="Poster" />
Poster</td>
              </tr>
          </table>
          </fieldset>
        </div>
          
        
        </td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
     
      <tr>
        <td align="left"><strong>Measurements (in milimeters):</strong></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><strong>Width</strong>: *</td>
        <td><strong>Height</strong>: *</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><input type="text" name="width" id="width" /></td>
        <td><input type="text" name="height" id="height" /></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><strong>Text, Quotes, etc.</strong></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="3"><textarea name="textarea" id="textarea" cols="45" rows="5"></textarea></td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right"><input type="submit" name="submit_order1" id="submit_order1" value="Go to step 2" /></td>
      </tr>
    </table>
    </form>
</div></div>
</body>
</html> 
And page 2:
PHP Code:
<?php
require_once("formtools/global/api/api.php");
$fields ft_api_init_form_page();
$params = array(
  
"submit_button" => "submit_order2",
  
"next_page" => "thank-you.php",
  
"form_data" => $_POST,
  
"no_sessions_url" => "http://ads.veromoda.com/index.php",
  
"finalize" => true
    
);
ft_api_process_form($params);
print_r($fields);
?>




<!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>Choose your desired image</title>
<link href="CSS/ads-style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #EEE;
}
h1 {
    font-size: 14px;
}
h2 {
    font-size: 10px;
}


h1,h2,h3,h4,h5,h6 {
    font-family: Arial, Helvetica, sans-serif;

</style>

</head>

<body>
<div id="container">
  <div id="header"></div>
  <div id="content">
    <div class="VM-adsservice-pic"></div>
    
    <form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
    


    <table width="765" border="0">
      <tr>
        <td colspan="3"><h1>Choose an image of your desire:<br />
          <br />
        </h1></td>
      </tr>
      <tr>
        <td width="255"><strong>Autumn 2011</strong>: Feminine</td>
        <td width="255">&nbsp;</td>
        <td width="255">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="3" align="center">
        <fieldset>
        <table width="700" id="Autumn1-Femi">
          <tr align="center" valign="top">
            <td>
            <p><img src="images/Style-images/Autumn1/Autumn-01_Femi-01_2011.jpg" alt="" width="315" height="135" /></p>
              <p>
                
                  <input type="radio" name="Autumn-01_Femi" value="Autumn-01_Femi-01" />
                </label>
              </p></td>
            <td>
              <p><img src="images/Style-images/Autumn1/Autumn-01_Femi-02_2011.jpg" alt="" width="361" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Autumn-01_Femi" value="Autumn-01_Femi-02" />
                </label>
              </p></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            </tr>
          <tr align="center" valign="top">
            <td><p><img src="images/Style-images/Autumn1/Autumn-01_Femi-03_2011.jpg" alt="" width="309" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Autumn-01_Femi" id="Bestseller_June-July_" value="Autumn-01_Femi-03" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Autumn1/Autumn-01_Femi-04_2011.jpg" alt="" width="110" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Autumn-01_Femi" id="Bestseller_June-July_2" value="Autumn-01_Femi-04" />
                  </label>
              </p></td>
            </tr>
          <tr align="center" valign="top">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr align="center" valign="top">
            <td><p><img src="images/Style-images/Autumn1/Autumn-01_Femi-05_2011.jpg" width="264" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Autumn-01_Femi" id="Autumn1-femi" value="Autumn-01_Femi-05" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Autumn1/Autumn-01_Femi-06-face_2011.jpg" width="315" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Autumn-01_Femi" id="radio" value="Autumn-01_Femi-06" />
                </label>
              </p></td>
          </tr>
        </table></fieldset></td>
        </tr>
      <tr>
        <td width="255">&nbsp;</td>
        <td width="255">&nbsp;</td>
        <td width="255">&nbsp;</td>
      </tr>
      <tr>
        <td><strong>Bestsellers</strong>: June - July</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="3" align="center">
        <fieldset>
        <table width="700" id="Bestsellers">
          <tr align="center" valign="top">
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_01.jpg" width="90" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Bestsellers_June_July" value="S11_VM_JuneJuly_01" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_02.jpg" width="90" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Bestsellers_June_July" value="S11_VM_JuneJuly_02" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_03.jpg" width="90" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Bestsellers_June_July" value="S11_VM_JuneJuly_03" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_04.jpg" width="203" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="Bestsellers_June_July" value="S11_VM_JuneJuly_04" />
                </label>
              </p></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr align="center" valign="top">
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_05.jpg" width="90" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="radio" id="Bestseller_June-July_5" value="S11_VM_JuneJuly_05" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_06.jpg" width="203" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="radio" id="Bestseller_June-July_6" value="S11_VM_JuneJuly_06" />
                </label>
              </p></td>
            <td><p><img src="images/Style-images/Bestsellers/S11_VM_JuneJuly_07.jpg" width="90" height="135" /></p>
              <p>
                <label>
                  <input type="radio" name="radio" id="Bestseller_June-July_7" value="S11_VM_JuneJuly_07" />
                </label>
              </p></td>
            <td>&nbsp;</td>
          </tr>
        </table>
        </fieldset>
        </td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right"><input type="submit" name="submit_order2" id="submit_order2" value="Order the printed material" /></td>
      </tr>
      <tr>
        <td width="255">&nbsp;</td>
        <td width="255"></td>
        <td width="255"></td>
      </tr>
    </table>
    
    </form>
  </div></div>
</body>
</html> 
And the thank you page:
PHP Code:
<?php
require_once("formtools/global/api/api.php");
$fields ft_api_init_form_page();
ft_api_clear_form_sessions();
print_r($fields);
?>

<!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>ads.veromoda.com</title>
<link href="CSS/ads-style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
body {
    margin-left: 0px;
    margin-top: 10px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #EEE;
}
h1 {
    font-size: 14px;
}
h2 {
    font-size: 10px;
}


h1,h2,h3,h4,h5,h6 {
    font-family: Arial, Helvetica, sans-serif;
}
</style>

</head>

<body>
<div id="container">
  <div id="header"></div>
  <div id="content">
    <div class="VM-adsservice-pic"></div>
    
    <form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
    


   <table width="765" border="0">
  <tr>
    <td colspan="3"><h1>VERO MODA Marketing thank you for your order</h1>
      The order has been received and you will have the layout to your approval a day or two before deadline.<br />
      The price of the material includes two approvals.
      <br />
      <br />
      Have a nice day.<br />
      VERO MODA Marketing<br /></td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td width="255">&nbsp;</td>
    <td width="255">&nbsp;</td>
    <td width="255">&nbsp;</td>
  </tr>
</table>
    
    </form>
  </div></div>
</body>
</html> 
I don't know much about php - so maybe this is too big an assignment for me? Should I rather go with the more simple formtool?

Thanks in advance Smile
Reply
#4
Heya,

Ah! On your very first page, you need to put this block of code at the very top, before the opening DOCTYPE.

Code:
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page("", "test");
$params = array(
  "submit_button" => "submit_order1",
  "next_page" => "choose-image.php",
  "form_data" => $_POST
    );
ft_api_process_form($params);
print_r($fields);
?>

The reason is that the ft_api_process_form() function actually redirects from one page to the next, but it can only do so if nothing's been output to the browser when it's called.

- Ben
Reply
#5
(Jul 1st, 2011, 7:29 AM)Ben Wrote: Heya,

Ah! On your very first page, you need to put this block of code at the very top, before the opening DOCTYPE.

Code:
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page("", "test");
$params = array(
  "submit_button" => "submit_order1",
  "next_page" => "choose-image.php",
  "form_data" => $_POST
    );
ft_api_process_form($params);
print_r($fields);
?>

The reason is that the ft_api_process_form() function actually redirects from one page to the next, but it can only do so if nothing's been output to the browser when it's called.

- Ben

Sorry Ben, but that don't seem to work either. I still get the "Form Tools hasn't received a successful test submission yet" in step 3 - And I don't know how to get past it? Can you tell me if it is a must to fill the form fields with php? Or will this tool do it for me? I need the last one since my php isn't to good... But please tell me - then I can move on with the more simple (Direct) Tool instead. ... Thank you so much Ben Smile


Attached Files Thumbnail(s)
   
Reply
#6
Hi Nuka,

Hmm...! I'm sure it's some little thing, but it's rather hard to debug without just looking at the form directly.

Any chance you could give me temporary FTP access + Form Tools access so I could look at the form directly on your server? I'll explain exactly what I did to fix it.

If not, no worries - just let me know!

- Ben
Reply
#7
Hi Ben
Sorry, but did you get my private message with the ftp access?

Best NuKa
Reply
#8
(Jul 13th, 2011, 12:37 AM)NuKa Wrote: Hi Ben
Sorry, but did you get my private message with the ftp access?

Best NuKa

Hi Nuka, Ben,

I also struggled with this issue. But I found it. It's a minor thing as Ben said. Look in yuur line where it says:

$fields = ft_api_init_form_page("", "test");

of course you already filled in your number like this:

$fields = ft_api_init_form_page("2", "test");

But the thing is what is still unclear to me is why it's called 'test'.
Because if you change that with 'initialize' you will see that it's going to work. So your line should be: (assuming your number is 2)

$fields = ft_api_init_form_page("2", "initialize");

That should do the trick.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)